forked from sirpalee/arnold-usd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
64 lines (50 loc) · 1.75 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
55
56
57
58
59
60
61
62
63
64
project(arnold-usd)
cmake_minimum_required(VERSION 3.1)
if (UNIX AND NOT APPLE)
set(LINUX TRUE)
endif ()
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" 0)
option(BUILD_DOCS "Building docs via doxygen." OFF)
option(PXR_MONOLITHIC_BUILD "Monolithic build was used for USD." OFF)
option(BUILD_USE_CUSTOM_BOOST "Using a custom boost layout." OFF)
option(BUILD_DISABLE_CXX11_ABI "Disable the use of the new CXX11 ABI" OFF)
option(BUILD_HOUDINI_TOOLS "Build Houdini tools" OFF)
option(USD_1910_UPDATED_COMPOSITOR "USD 0.19.10 has the updated compositor" OFF)
# Global required packagse
find_package(OpenGL REQUIRED)
find_package(USD REQUIRED)
find_package(Arnold REQUIRED)
if (NOT BUILD_USE_CUSTOM_BOOST)
find_package(Boost COMPONENTS python REQUIRED)
endif ()
find_package(PythonLibs REQUIRED)
find_package(TBB REQUIRED)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/arnold_usd.h.in"
"${CMAKE_CURRENT_BINARY_DIR}/arnold_usd.h")
set(CMAKE_CXX_STANDARD 11 CACHE STRING "CMake CXX Standard")
if (LINUX)
string(APPEND CMAKE_SHARED_LINKER_FLAGS " -Wl,--no-undefined")
endif ()
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 6.3)
# GCC 6.3.1 complains about the usage of auto_ptr from the newer
# TBB versions.
add_compile_options(-Wno-deprecated-declarations)
if (BUILD_DISABLE_CXX11_ABI)
add_compile_options(-D_GLIBCXX_USE_CXX11_ABI=0)
endif ()
endif ()
endif ()
add_subdirectory(ndr)
add_subdirectory(render_delegate)
if (BUILD_HOUDINI_TOOLS)
add_subdirectory(third_party)
endif ()
if (BUILD_DOCS)
add_subdirectory(docs)
endif ()
install(FILES LICENSE.md
DESTINATION .)
install(FILES plugInfo.json
DESTINATION plugin)