-
Notifications
You must be signed in to change notification settings - Fork 19
/
CMakeLists.txt
50 lines (38 loc) · 1.45 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
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
include(CMakeDependentOption)
project(gatling VERSION 0.5.0)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(OUTPUT_DIR "${CMAKE_BINARY_DIR}/bin")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${OUTPUT_DIR}")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${OUTPUT_DIR}")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}")
foreach(CONFIG_TYPE ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER ${CONFIG_TYPE} CONFIG_TYPE)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONFIG_TYPE} ${OUTPUT_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CONFIG_TYPE} ${OUTPUT_DIR})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CONFIG_TYPE} ${OUTPUT_DIR})
endforeach()
option(GTL_BUILD_HDGATLING "Build the gatling hydra render delegate." ON)
option(GTL_VERBOSE "Enable verbose logging." OFF)
if(${GTL_BUILD_HDGATLING})
find_package(OpenGL REQUIRED) # Required due to USD bug #3309
find_package(MaterialX REQUIRED HINTS ${USD_ROOT})
find_package(USD REQUIRED HINTS ${USD_ROOT} NAMES pxr)
endif()
find_package(MDL REQUIRED)
find_package(OpenMP)
include(CheckLibraryExists)
check_library_exists(m exp2f "" C_MATH_LIBRARY_EXISTS)
if(C_MATH_LIBRARY_EXISTS)
set(C_MATH_LIBRARY "m")
endif()
if(WIN32)
add_compile_definitions(NOMINMAX)
add_compile_definitions(_USE_MATH_DEFINES)
endif()
include(cmake/BuildConfig.cmake)
add_subdirectory(extern)
add_subdirectory(src)