-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
CMakeLists.txt
74 lines (59 loc) · 2.06 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
65
66
67
68
69
70
71
72
73
74
cmake_minimum_required(VERSION 3.14)
project(usd)
if (NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
if (WIN32)
message(FATAL_ERROR "Compiler does not support 64-bit builds. "
"If you are using Visual Studio, make sure you are in the "
"x64 command prompt and have specified the Win64 cmake "
"generator (e.g., -G \"Visual Studio 15 2017 Win64\")")
else()
message(FATAL_ERROR "Compiler does not support 64-bit builds.")
endif()
endif()
list(APPEND CMAKE_MODULE_PATH
${PROJECT_SOURCE_DIR}/cmake/defaults
${PROJECT_SOURCE_DIR}/cmake/modules
${PROJECT_SOURCE_DIR}/cmake/macros)
include(Options)
include(ProjectDefaults)
include(Packages)
# This has to be defined after Packages is included, because it relies on the
# discovered path to the python executable.
set(PXR_PYTHON_SHEBANG "${PYTHON_EXECUTABLE}"
CACHE
STRING
"Replacement path for Python #! line."
)
# CXXDefaults will set a variety of variables for the project.
# Consume them here. This is an effort to keep the most common
# build files readable.
include(CXXDefaults)
add_definitions(${_PXR_CXX_DEFINITIONS})
set(CMAKE_CXX_FLAGS "${_PXR_CXX_FLAGS} ${CMAKE_CXX_FLAGS}")
include(Public)
pxr_toplevel_prologue()
add_subdirectory(pxr)
add_subdirectory(extras)
if (PXR_BUILD_PRMAN_PLUGIN)
set(prmanPluginPath "third_party/renderman-${RENDERMAN_VERSION_MAJOR}")
get_filename_component(prmanPluginAbsPath "${prmanPluginPath}" ABSOLUTE)
if (EXISTS "${prmanPluginAbsPath}")
add_subdirectory("${prmanPluginPath}")
else()
message(FATAL_ERROR "No RenderMan plugin available for "
"RenderMan ${RENDERMAN_VERSION_MAJOR}")
endif()
endif()
if (PXR_BUILD_TESTS)
pxr_tests_prologue()
endif()
if (PXR_BUILD_DOCUMENTATION)
pxr_build_documentation()
# If building python doc strings, run script
# that uses doxygen build results and installed
# USD python modules
if (PXR_BUILD_PYTHON_DOCUMENTATION)
pxr_build_python_documentation()
endif()
endif()
pxr_toplevel_epilogue()