vcpkg/ports/magic-enum/portfile.cmake

28 lines
822 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
2020-12-04 09:37:14 +08:00
REF v0.7.1
SHA512 0eff2901d9829289fa36811fd428a9a6b66d6b88971948a385c9e74e5bbe3f52f4b80321c96a4d002bfe2c9b3d45e9bae8fbe17d718643fa318ab845b887be09
HEAD_REF master
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
2019-10-08 16:31:48 +08:00
PREFER_NINJA
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_install_cmake()
2019-10-08 16:31:48 +08:00
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/magic_enum TARGET_PATH share/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)