-
Notifications
You must be signed in to change notification settings - Fork 22
/
CMakeLists.txt
54 lines (39 loc) · 2.02 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
cmake_minimum_required(VERSION 3.23.0 FATAL_ERROR)
project(VPT LANGUAGES CXX CUDA)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
##################################################################
## Set output directories
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BINARY_DIR}/bin)
##################################################################
set(_VCPKG_INCLUDE_DIR "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include")
set(_VCPKG_LIB_DIR "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib")
set(_VCPKG_BIN_DIR "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin")
option (BUILD_VPT "Builds Volumetric Path Tracer" ON)
option (BUILD_INSTANCER "Builds Houdini plugin to save instance files" OFF)
set(DebugLevel "Error" CACHE STRING "Choose a debug level that VPT will use in message display")
set_property(CACHE DebugLevel PROPERTY STRINGS Error Warning Log)
message(STATUS "Debug Level is ${DebugLevel}")
if(${DebugLevel} STREQUAL "Error")
add_definitions(-DLOG_LEVEL_ERROR)
elseif(${DebugLevel} STREQUAL "Warning")
add_definitions(-DLOG_LEVEL_WARNING)
elseif(${DebugLevel} STREQUAL "Log")
add_definitions(-DLOG_LEVEL_LOG)
endif()
if(BUILD_VPT)
add_subdirectory(${CMAKE_SOURCE_DIR}/source)
endif(BUILD_VPT)
if(BUILD_INSTANCER)
add_subdirectory(${CMAKE_SOURCE_DIR}/instancer_hda)
endif(BUILD_INSTANCER)