git.s-ol.nu ~forks/DiligentTools / 4ed217a
Asset loader: added option to enable draco using DRACO_PATH assiduous 1 year, 7 months ago
2 changed file(s) with 10 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
4545 target_compile_definitions(Diligent-AssetLoader PRIVATE TINYGLTF_ENABLE_DRACO)
4646 get_target_property(DRACO_SOURCE_DIR draco SOURCE_DIR)
4747 target_include_directories(Diligent-AssetLoader PRIVATE "${DRACO_SOURCE_DIR}/src" "${CMAKE_BINARY_DIR}")
48 elseif (DRACO_PATH)
49 find_library(DRACO_LIBRARY NAMES draco PATHS "${DRACO_PATH}/lib")
50 if(DRACO_LIBRARY)
51 target_link_libraries(Diligent-AssetLoader PRIVATE ${DRACO_LIBRARY})
52 target_include_directories(Diligent-AssetLoader PRIVATE "${DRACO_PATH}/include")
53 target_compile_definitions(Diligent-AssetLoader PRIVATE TINYGLTF_ENABLE_DRACO)
54 else()
55 message("Unable to find draco library. Draco support will be disabled")
56 endif()
4857 endif()
4958
5059 set_target_properties(Diligent-AssetLoader PROPERTIES
66 * [Asset Loader](AssetLoader): an asset loading libary. The library currently supports GLTF 2.0.
77 * To enable Draco compression, download [Draco repository](https://github.com/google/draco) and include it into
88 your project. Make sure that Draco source folder is processed by CMake *before* DiligentTools folder.
9 Alternatively, you can specify a path to the Draco installation folder using `DRACO_PATH` CMake variable.
910 * [Imgui](Imgui): implementation of [dear imgui](https://github.com/ocornut/imgui) with Diligent API.
1011 * [NativeApp](NativeApp): implementation of native application on supported platforms.
1112