vcpkg/ports/magic-enum/portfile.cmake
2019-10-08 15:37:35 +05:00

32 lines
865 B
CMake

# header-only library
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Neargye/magic_enum
REF v0.6.2
SHA512 548de13d5a80a08bdf5a02bfc527d19c2b0092b46e63e7ecd029878a4f85461c5a819d446edc74d1e770887a75ece5a37b967b2175fec7092eeb4314a4766469
HEAD_REF master
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DMAGIC_ENUM_OPT_BUILD_EXAMPLES=OFF
-DMAGIC_ENUM_OPT_BUILD_TESTS=OFF
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/magic_enum)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib)
# Handle copyright
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/magic-enum/copyright COPYONLY)
# CMake integration test
vcpkg_test_cmake(PACKAGE_NAME magic-enum)