-
Notifications
You must be signed in to change notification settings - Fork 59
/
Copy pathCMakeLists.txt
101 lines (88 loc) · 2.56 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
set(SRC
nodes/driver_aov.cpp
nodes/driver_main.cpp
nodes/nodes.cpp
basis_curves.cpp
camera.cpp
config.cpp
debug_codes.cpp
instancer.cpp
light.cpp
mesh.cpp
native_rprim.cpp
node_graph.cpp
openvdb_asset.cpp
points.cpp
render_buffer.cpp
render_delegate.cpp
render_param.cpp
render_pass.cpp
renderer_plugin.cpp
shape.cpp
utils.cpp
volume.cpp
)
set(HDR
api.h
basis_curves.h
camera.h
config.h
debug_codes.h
rprim.h
hdarnold.h
instancer.h
light.h
mesh.h
native_rprim.h
node_graph.h
openvdb_asset.h
points.h
render_buffer.h
render_delegate.h
render_param.h
render_pass.h
renderer_plugin.h
shape.h
utils.h
volume.h
)
add_library(hdArnold SHARED ${COMMON_SRC} ${SRC})
if (BUILD_HEADERS_AS_SOURCES)
target_sources(hdArnold PRIVATE ${COMMON_HDR} ${HDR})
endif ()
set(_usd_deps arch plug trace tf vt gf work sdf hf hd usdImaging usdLux pxOsd cameraUtil)
if (${USD_VERSION} VERSION_LESS "0.20.5")
set(_usd_deps ${_usd_deps} hdx)
endif ()
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${SRC} ${HDR})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/../common PREFIX common FILES ${COMMON_SRC} ${COMMON_HDR})
add_common_dependencies(
TARGET_NAME hdArnold
USD_DEPENDENCIES ${_usd_deps})
target_compile_definitions(hdArnold PRIVATE "HDARNOLD_EXPORTS=1")
if (${USD_HAS_UPDATED_COMPOSITOR})
target_compile_definitions(hdArnold PUBLIC "USD_HAS_UPDATED_COMPOSITOR=1")
endif ()
if (${USD_HAS_FULLSCREEN_SHADER})
target_compile_definitions(hdArnold PUBLIC "USD_HAS_FULLSCREEN_SHADER=1")
endif ()
if (${USD_VERSION} VERSION_GREATER "0.19.7")
set(RENDERER_PLUGIN_BASE "HdRendererPlugin")
else ()
set(RENDERER_PLUGIN_BASE "HdxRendererPlugin")
endif ()
# We replicate the layout of the plugin installation inside the build dir for running the testsuite without installing.
# Since we need the same structure for each config, we need to use generator expressions to create the pluginfo
# files inside the build directories. The current workaround for that is to use file(GENERATE).
set(PLUGINFO "${CMAKE_CURRENT_BINARY_DIR}/plug/plugInfo.json")
configure_file(
plugInfo.json.in
"${PLUGINFO}"
)
generate_plug_info_for_testsuite(TARGET_NAME hdArnold TARGET_PLUGINFO "${PLUGINFO}")
install(TARGETS hdArnold
DESTINATION "${PREFIX_PLUGINS}")
install(FILES "${PLUGINFO}"
DESTINATION "${PREFIX_PLUGINS}/hdArnold/resources")
install(FILES ${HDR}
DESTINATION "${PREFIX_HEADERS}/arnold_usd/render_delegate")