pineapple/externals/vcpkg/ports/magic-enum/portfile.cmake
2022-07-23 03:01:36 +02:00

27 lines
854 B
CMake
Executable file

# header-only library
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Neargye/magic_enum
REF v0.8.0
SHA512 097260c234a1b716d26b537cd80a8d3eca255422e8dce46183708a27b1d4ad1d81c6be05f1b7d300db3362eafa243cccc39c9d12f1bcbfdb0d7755701a222808
HEAD_REF master
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DMAGIC_ENUM_OPT_ENABLE_NONASCII=OFF
-DMAGIC_ENUM_OPT_BUILD_EXAMPLES=OFF
-DMAGIC_ENUM_OPT_BUILD_TESTS=OFF
-DMAGIC_ENUM_OPT_INSTALL=ON
)
vcpkg_cmake_install()
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")
# Handle copyright
configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)