vcpkg/ports/magic-enum/portfile.cmake
Weihang Ding 0e12581197
[magic-enum] Bump to 0.9.3 (#32948)
* [magic-enum] Bump to 0.9.3

* update version database
2023-08-04 06:47:33 -07:00

28 lines
884 B
CMake

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Neargye/magic_enum
REF "v${VERSION}"
SHA512 0bee01840d69a102f9c07e063a8314f40593bd476545176ba2895549b899d6c619d76588e2d55e2c71c2812cd41c1f802e0718461e8b31d37ac6264273001236
HEAD_REF master
)
set(VCPKG_BUILD_TYPE release) # header-only port
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-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}/lib")
# Handle copyright
configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")