vcpkg/ports/tinygltf/portfile.cmake

16 lines
657 B
CMake

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