vcpkg/ports/tinygltf/portfile.cmake
2024-03-29 17:29:23 -07:00

16 lines
656 B
CMake

# Header-only library
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO syoyo/tinygltf
REF "v${VERSION}"
SHA512 e19fef45b96ada72cfb79582cb72af909db6cae518b1548b34e7d60c2d1b0a1d41ebb0649d0c536c5cb073b08df2298e622789c14df62b12808a8accb400686d
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")