vcpkg/ports/magic-enum/portfile.cmake
2020-06-10 18:01:39 -07:00

27 lines
785 B
CMake

# header-only library
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Neargye/magic_enum
REF v0.6.6
SHA512 aeab69a87d0bcac93a987489a7bce9bd5971b7df1a5f83bfe9c58292dec736aa3b60a238c38d04080608199ea45c946da50b13934fb320e5f63e38b9185b526f
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 TARGET_PATH share/magic_enum)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib)
# Handle copyright
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)