2023-08-04 21:47:33 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO Neargye/magic_enum
|
|
|
|
REF "v${VERSION}"
|
2024-11-19 14:04:41 +08:00
|
|
|
SHA512 8b61c621ff2a6981b4ff89f7df577091ffc9382d443c061db612fb61822dbf6ef8aba69ea35d1c435dcffbd7434cb4ccc5d12bbe2deba1cf0a5316c979ee6a4b
|
2023-08-04 21:47:33 +08:00
|
|
|
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)
|
2024-11-19 14:04:41 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
|
2023-08-04 21:47:33 +08:00
|
|
|
|
|
|
|
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}")
|