-
Notifications
You must be signed in to change notification settings - Fork 67
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
75 lines (60 loc) · 2.01 KB
/
CMakeLists.txt
File metadata and controls
75 lines (60 loc) · 2.01 KB
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
65
66
67
68
69
70
71
72
73
74
75
cmake_minimum_required(VERSION 3.24)
project(arnold-usd)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" 0)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/utils" 0)
list(APPEND CMAKE_MODULE_PATH "${USD_LOCATION}/lib/cmake/" 0)
# Define the project and build options
include(options)
# Global required packagse
find_package(USD REQUIRED)
find_package(Arnold REQUIRED)
# Include build helper functions
include(build)
# Include default compiler options
include(defaults)
# If we are building the bundle, we don't want to build the other plugins
if (BUILD_BUNDLE AND NOT BUILD_WITH_USD_STATIC)
message(STATUS "Building Bundle - deactivating other plugins")
set(BUILD_RENDER_DELEGATE OFF)
set(BUILD_NDR_PLUGIN OFF)
set(BUILD_USD_IMAGING_PLUGIN OFF)
set(BUILD_SCENE_INDEX_PLUGIN OFF)
set(BUILD_PROCEDURAL OFF)
else()
# And if we build with USD static, we don't want the bundle (for now)
message(STATUS "Setting BUILD_BUNDLE=OFF and ENABLE_SCENE_INDEX_IN_BUNDLE=OFF")
set(BUILD_BUNDLE OFF)
set(ENABLE_SCENE_INDEX_IN_BUNDLE OFF)
endif()
# Adding libs and plugins
add_subdirectory(libs)
add_subdirectory(plugins)
if (BUILD_USDGENSCHEMA_ARNOLD)
message(STATUS "Building custom usdGenSchema")
add_subdirectory(tools/usdgenschema)
endif()
# Building the schemas
if (BUILD_SCHEMAS)
add_subdirectory(schemas)
install(FILES plugInfo.json
DESTINATION "${PREFIX_SCHEMA}")
endif ()
if (BUILD_DOCS)
add_subdirectory(docs)
endif ()
# We are only testing the procedural
if (BUILD_TESTSUITE AND BUILD_PROCEDURAL)
enable_testing()
add_subdirectory(testsuite)
endif ()
if (NOT BUILD_WITH_USD_STATIC)
if (BUILD_RENDER_DELEGATE OR BUILD_NDR_PLUGIN OR BUILD_USD_IMAGING_PLUGIN OR BUILD_SCENE_INDEX_PLUGIN)
install(FILES plugInfo.json
DESTINATION "${PREFIX_PLUGINS}")
endif ()
if (BUILD_BUNDLE)
install(FILES plugInfo.json
DESTINATION "${PREFIX_BUNDLE}")
endif()
endif()
install(FILES LICENSE.md DESTINATION .)