forked from AcademySoftwareFoundation/MaterialX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
27 lines (22 loc) · 930 Bytes
/
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
file(GLOB pymaterialxformat_source "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
file(GLOB pymaterialxformat_headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
pybind11_add_module(PyMaterialXFormat SHARED ${PYBIND11_MODULE_FLAGS} ${pymaterialxformat_source} ${pymaterialxformat_headers})
if(APPLE)
set_target_properties(PyMaterialXFormat PROPERTIES CXX_VISIBILITY_PRESET "default")
endif()
set_target_properties(
PyMaterialXFormat
PROPERTIES
OUTPUT_NAME PyMaterialXFormat
COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS}"
LINK_FLAGS "${EXTERNAL_LINK_FLAGS}"
VERSION "${MATERIALX_LIBRARY_VERSION}"
SOVERSION "${MATERIALX_MAJOR_VERSION}"
DEBUG_POSTFIX "${MATERIALX_PYTHON_DEBUG_POSTFIX}")
target_link_libraries(
PyMaterialXFormat
PUBLIC PyMaterialXCore
MaterialXFormat
PRIVATE ${CMAKE_DL_LIBS})
install(TARGETS PyMaterialXFormat
DESTINATION "${CMAKE_INSTALL_PREFIX}/python/MaterialX")