vcpkg/ports/kerbal/portfile.cmake

51 lines
1.4 KiB
CMake
Raw Normal View History

set(KERBAL_SHA_CORE e041a1e9b2199544fec81af01416653f169a73a42a2c76ca59562db02e886e8867dfb7a63952804c121c8ce39e22f93218b89d5b7c89d7bed29b315c24cd5d73)
set(KERBAL_SHA_PRETTY_PRINTER 93daa918a626a213e68b56552ab1708df8cdd31276099d71bb2d7798955c18506d507021602948bc5f9baddfdaf802bc6078e75a7830d18156375e93f9cfc401)
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")