aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/ms-gltf/portfile.cmake
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/ms-gltf/portfile.cmake
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/ms-gltf/portfile.cmake')
-rw-r--r--vcpkg/ports/ms-gltf/portfile.cmake39
1 files changed, 39 insertions, 0 deletions
diff --git a/vcpkg/ports/ms-gltf/portfile.cmake b/vcpkg/ports/ms-gltf/portfile.cmake
new file mode 100644
index 0000000..169eb21
--- /dev/null
+++ b/vcpkg/ports/ms-gltf/portfile.cmake
@@ -0,0 +1,39 @@
+if(VCPKG_TARGET_IS_WINDOWS)
+ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+endif()
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO microsoft/glTF-SDK
+ REF 4888f0a386e174af6170c3c53b3396945f4a65a0 # 05-09-2024
+ SHA512 5bee9c056d3d6eb809d8336cedc0fad58bc5b33128d4094cccfca5d0180b78e237d63c2c7c7beb08dd09f49a613a35bc0c08642b150ae8482ef9643165d7822b
+ HEAD_REF master
+ PATCHES
+ fix-install.patch
+)
+
+# note: Test/Sample executables won't be installed
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ FEATURES
+ test ENABLE_UNIT_TESTS
+ samples ENABLE_SAMPLES
+)
+
+# note: Platform-native buildsystem will be more helpful to launch/debug the tests/samples.
+# note: The PDB file path is making Ninja fails to install.
+# For Windows, we rely on /MP. The other platforms should be able to build with PREFER_NINJA.
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ WINDOWS_USE_MSBUILD
+ OPTIONS
+ ${FEATURE_OPTIONS}
+)
+vcpkg_cmake_install()
+vcpkg_copy_pdbs()
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
+endif()
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")