pineapple-src/externals/vcpkg/ports/inja/portfile.cmake
2022-07-23 03:01:36 +02:00

28 lines
954 B
CMake
Executable file

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO pantor/inja
REF 2d515078c647457436556763aca8d4bf7d11d5e8 # v3.3.0
SHA512 4e2f63297eede016772e4915cacfec57b49633f2a5fb80862bbd091d274f688ea1fbe958f97699e930fdee9f390ce0637513f4265190c171104d9eae9b12a59d
HEAD_REF master
)
vcpkg_configure_cmake(
SOURCE_PATH "${SOURCE_PATH}"
PREFER_NINJA
OPTIONS
-DINJA_USE_EMBEDDED_JSON=OFF
-DBUILD_TESTING=OFF
-DBUILD_BENCHMARK=OFF
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/inja)
vcpkg_copy_pdbs()
# Inja is a header-only library
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")
# Don't need built-in nlohmann-json as this package depends on nlohmann-json
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/inja/json")
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)