cesium-native/CesiumGltfReader/CMakeLists.txt

57 lines
1.7 KiB
CMake
Raw Permalink Normal View History

2021-01-04 14:41:37 +08:00
add_library(CesiumGltfReader "")
configure_cesium_library(CesiumGltfReader)
cesium_glob_files(CESIUM_GLTF_READER_SOURCES src/*.cpp generated/*.cpp)
cesium_glob_files(CESIUM_GLTF_READER_HEADERS src/*.h src/*.hpp generated/*.h generated/*.hpp)
2021-03-05 05:52:06 +08:00
cesium_glob_files(CESIUM_GLTF_READER_PUBLIC_HEADERS include/CesiumGltf/*.h) # Correct is CesiumGltf not CesiumGltfReader
cesium_glob_files(CESIUM_GLTF_READER_TEST_SOURCES test/*.cpp)
cesium_glob_files(CESIUM_GLTF_READER_TEST_HEADERS test/*.h)
set_target_properties(CesiumGltfReader
PROPERTIES
TEST_SOURCES "${CESIUM_GLTF_READER_TEST_SOURCES}"
TEST_HEADERS "${CESIUM_GLTF_READER_TEST_HEADERS}"
TEST_DATA_DIR ${CMAKE_CURRENT_LIST_DIR}/test/data
)
2021-01-04 14:41:37 +08:00
set_target_properties(CesiumGltfReader
PROPERTIES
PUBLIC_HEADER "${CESIUM_GLTF_READER_PUBLIC_HEADERS}"
)
2021-01-04 14:41:37 +08:00
target_sources(
CesiumGltfReader
PRIVATE
${CESIUM_GLTF_READER_SOURCES}
${CESIUM_GLTF_READER_HEADERS}
2021-01-04 14:41:37 +08:00
PUBLIC
${CESIUM_GLTF_READER_PUBLIC_HEADERS}
2021-01-04 14:41:37 +08:00
)
target_include_directories(
CesiumGltfReader
SYSTEM PUBLIC
# Necessary for `draco/draco_features.h`
${CESIUM_NATIVE_DRACO_INCLUDE_DIR}
2021-01-12 18:40:35 +08:00
${CMAKE_BINARY_DIR}
${CESIUM_NATIVE_STB_INCLUDE_DIR}
${CMAKE_CURRENT_LIST_DIR}/include
2021-01-04 14:41:37 +08:00
PRIVATE
${CMAKE_CURRENT_LIST_DIR}/src
${CMAKE_CURRENT_LIST_DIR}/generated
2021-01-04 14:41:37 +08:00
)
target_link_libraries(CesiumGltfReader
PUBLIC
CesiumGltf
2021-04-13 20:05:36 +08:00
CesiumJsonReader
GSL
modp_b64
2021-07-27 05:03:13 +08:00
${CESIUM_NATIVE_DRACO_LIBRARY}
)
2021-03-04 06:48:09 +08:00
install(TARGETS CesiumGltfReader
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
2021-03-05 05:52:06 +08:00
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/CesiumGltf # Correct is CesiumGltf not CesiumGltfReader
)