vcpkg/ports/kerbal/portfile.cmake
Wentsing Nee 8f9797fbb4
[kerbal] update to v2024.7.1 (#40115)
Co-authored-by: WentsingNee <8090395+wentsingnee@user.noreply.gitee.com>
2024-07-27 01:21:37 -07:00

51 lines
1.4 KiB
CMake

set(KERBAL_SHA_CORE e2455d73847108318a867b3495acde5b9773719f99c1cadd834456604c8a45ddc67e4ac3c6a15ddc91c5c3c5d09761ab8c40f29e882c2ca880f1d017fd0e87ce)
set(KERBAL_SHA_PRETTY_PRINTER a9ab9115abcb59b86fa1d5a8715070c11657e068a25df09cead6b87b4c7e0fabaef80ca51c7675067fc36bfe645933cb09092f12ff5dfa570279f74a22881790)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO WentsingNee/Kerbal
REF "v${VERSION}"
SHA512 "${KERBAL_SHA_CORE}"
HEAD_REF main
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
"pretty-printer" WITH_PRETTY_PRINTER
)
if (WITH_PRETTY_PRINTER)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH_PRETTY_PRINTER
REPO WentsingNee/KerbalPrettyPrinter
REF "v${VERSION}"
SHA512 "${KERBAL_SHA_PRETTY_PRINTER}"
HEAD_REF main
)
file(GLOB pretty_printer_files
LIST_DIRECTORIES True
"${SOURCE_PATH_PRETTY_PRINTER}/*"
)
foreach (e IN LISTS pretty_printer_files)
file(
COPY "${e}"
DESTINATION "${SOURCE_PATH}/pretty_printer"
)
endforeach ()
endif ()
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(
CONFIG_PATH "share/cmake/Kerbal"
)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")