vcpkg/ports/tinygltf/portfile.cmake
miyanyan 2ac5baa352
[tinygltf] update to 2.8.22 (#38914)
- [x] Changes comply with the [maintainer
guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md).
- [x] SHA512s are updated for each updated download.
- [ ] The "supports" clause reflects platforms that may be fixed by this
new version.
- [ ] Any fixed [CI
baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt)
entries are removed from that file.
- [ ] Any patches that are no longer applied are deleted from the port's
directory.
- [x] The version database is fixed by rerunning `./vcpkg x-add-version
--all` and committing the result.
- [x] Only one version is added to each modified port's versions file.
2024-05-24 14:48:54 -07:00

16 lines
657 B
CMake

# Header-only library
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO syoyo/tinygltf
REF "v${VERSION}"
SHA512 91b5802860eecfed25dcbe766e75ec41d307942a9a7fb6efb8d1090f32604ca598383291194757b33608e9afac48e6308a0b543bd696d58e73ecafc44238ca99
HEAD_REF master
)
# Put the licence file where vcpkg expects it
# Copy the tinygltf header files and fix the path to json
vcpkg_replace_string("${SOURCE_PATH}/tiny_gltf.h" "#include \"json.hpp\"" "#include <nlohmann/json.hpp>")
file(INSTALL "${SOURCE_PATH}/tiny_gltf.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")