2021-01-25 17:54:04 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO microsoft/glTF-SDK
|
2022-07-01 04:36:33 +08:00
|
|
|
REF eaccf166e2718c6133db426545b6d008cb7ad79f # 28-06-2022
|
|
|
|
SHA512 112e31d2f42d2fb22060a687f7d33f22e677d8d7eca006eb8c1edef6a61b8bad637df15492665656ea88a5a0b980851eb978a180b4a01d307d1bbc92f63500f1
|
2021-01-25 17:54:04 +08:00
|
|
|
HEAD_REF master
|
|
|
|
PATCHES
|
|
|
|
fix-install.patch
|
|
|
|
fix-apple-filesystem.patch
|
|
|
|
)
|
|
|
|
|
|
|
|
# note: Test/Sample executables won't be installed
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2021-09-08 12:09:06 +08:00
|
|
|
FEATURES
|
2021-01-25 17:54:04 +08:00
|
|
|
test ENABLE_UNIT_TESTS
|
|
|
|
samples ENABLE_SAMPLES
|
|
|
|
)
|
|
|
|
|
|
|
|
# note: Platform-native buildsystem will be more helpful to launch/debug the tests/samples.
|
2021-09-08 12:09:06 +08:00
|
|
|
# note: The PDB file path is making Ninja fails to install.
|
2021-01-25 17:54:04 +08:00
|
|
|
# For Windows, we rely on /MP. The other platforms should be able to build with PREFER_NINJA.
|
2021-09-08 12:09:06 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2022-07-26 03:23:04 +08:00
|
|
|
WINDOWS_USE_MSBUILD
|
2021-01-25 17:54:04 +08:00
|
|
|
OPTIONS
|
|
|
|
${FEATURE_OPTIONS}
|
|
|
|
)
|
2021-09-08 12:09:06 +08:00
|
|
|
vcpkg_cmake_install()
|
2021-01-25 17:54:04 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
2021-09-08 12:09:06 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
2021-01-25 17:54:04 +08:00
|
|
|
endif()
|
2021-09-08 12:09:06 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
|
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|