vcpkg/ports/magic-enum/portfile.cmake

27 lines
808 B
CMake
Raw Normal View History

2019-10-08 16:31:48 +08:00
# header-only library
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
2019-10-08 16:31:48 +08:00
REPO Neargye/magic_enum
REF v0.9.2
SHA512 5c88ebcb30282bea5c2b38d17a6ee6a9014e5d282f2c08e92f398f30d9846cbd5a09599270afe82e927069bad9c50d691fa53a82da059f77dc1c01b179e65689
HEAD_REF master
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
2019-10-08 16:31:48 +08:00
-DMAGIC_ENUM_OPT_BUILD_EXAMPLES=OFF
-DMAGIC_ENUM_OPT_BUILD_TESTS=OFF
2020-10-16 03:43:37 +08:00
-DMAGIC_ENUM_OPT_INSTALL=ON
)
vcpkg_cmake_install()
2019-10-08 16:31:48 +08:00
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/magic_enum PACKAGE_NAME magic_enum)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_PACKAGES_DIR}/lib")
2019-10-08 16:31:48 +08:00
# Handle copyright
configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)