forked from autodesk-forks/MaterialX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
36 lines (28 loc) · 1.13 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
include_directories(
${EXTERNAL_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../
)
file(GLOB materialx_source "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
file(GLOB materialx_headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
add_library(MaterialXCore STATIC ${materialx_source} ${materialx_headers})
add_definitions(-DMATERIALX_MAJOR_VERSION=${MATERIALX_MAJOR_VERSION})
add_definitions(-DMATERIALX_MINOR_VERSION=${MATERIALX_MINOR_VERSION})
add_definitions(-DMATERIALX_BUILD_VERSION=${MATERIALX_BUILD_VERSION})
set_target_properties(
MaterialXCore PROPERTIES
OUTPUT_NAME MaterialXCore
COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS}"
LINK_FLAGS "${EXTERNAL_LINK_FLAGS}"
VERSION "${MATERIALX_LIBRARY_VERSION}"
SOVERSION "${MATERIALX_MAJOR_VERSION}")
target_link_libraries(
MaterialXCore
${CMAKE_DL_LIBS}
)
install(TARGETS MaterialXCore
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/
)
install(FILES ${materialx_headers}
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/MaterialXCore/)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/MaterialXCore.pdb"
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/" OPTIONAL)