vcpkg/ports/kerbal/portfile.cmake

51 lines
1.4 KiB
CMake
Raw Normal View History

set(KERBAL_SHA_CORE a6b2a1108314f90ad8b04904df744a6727b1b638f7f224ea17d52caa78e33bfe2da4096200f62640668a28b1ca478654c856696b8a71c5dcba0e7338af72b912)
set(KERBAL_SHA_PRETTY_PRINTER 213ee64385e9e372f7da4d015f24c2e6f71a8e8e68523114d945ae8c17114c963c79c919d1b3c330b55a56bbc1362f48ee866baef6ea18ea8e2dc7c1b1c87c48)
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")