diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-02-24 22:15:23 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-02-24 22:15:23 +0000 |
| commit | 4ed217af70ac8d94f1595db8747abeb9fc00775e (patch) | |
| tree | 354458e45d63915ef730f9b9909253dd87c27a3f /AssetLoader | |
| parent | Updated cmake file to enable draco compression in tiny gltf (diff) | |
| download | DiligentTools-4ed217af70ac8d94f1595db8747abeb9fc00775e.tar.gz DiligentTools-4ed217af70ac8d94f1595db8747abeb9fc00775e.zip | |
Asset loader: added option to enable draco using DRACO_PATH
Diffstat (limited to 'AssetLoader')
| -rw-r--r-- | AssetLoader/CMakeLists.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/AssetLoader/CMakeLists.txt b/AssetLoader/CMakeLists.txt index 1b4a74b..1994ab3 100644 --- a/AssetLoader/CMakeLists.txt +++ b/AssetLoader/CMakeLists.txt @@ -46,6 +46,15 @@ if (TARGET draco) target_compile_definitions(Diligent-AssetLoader PRIVATE TINYGLTF_ENABLE_DRACO) get_target_property(DRACO_SOURCE_DIR draco SOURCE_DIR) target_include_directories(Diligent-AssetLoader PRIVATE "${DRACO_SOURCE_DIR}/src" "${CMAKE_BINARY_DIR}") +elseif (DRACO_PATH) + find_library(DRACO_LIBRARY NAMES draco PATHS "${DRACO_PATH}/lib") + if(DRACO_LIBRARY) + target_link_libraries(Diligent-AssetLoader PRIVATE ${DRACO_LIBRARY}) + target_include_directories(Diligent-AssetLoader PRIVATE "${DRACO_PATH}/include") + target_compile_definitions(Diligent-AssetLoader PRIVATE TINYGLTF_ENABLE_DRACO) + else() + message("Unable to find draco library. Draco support will be disabled") + endif() endif() set_target_properties(Diligent-AssetLoader PROPERTIES |
