aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/magic-enum
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/magic-enum')
-rw-r--r--vcpkg/ports/magic-enum/portfile.cmake24
-rw-r--r--vcpkg/ports/magic-enum/usage4
-rw-r--r--vcpkg/ports/magic-enum/vcpkg.json18
3 files changed, 46 insertions, 0 deletions
diff --git a/vcpkg/ports/magic-enum/portfile.cmake b/vcpkg/ports/magic-enum/portfile.cmake
new file mode 100644
index 0000000..74034e2
--- /dev/null
+++ b/vcpkg/ports/magic-enum/portfile.cmake
@@ -0,0 +1,24 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO Neargye/magic_enum
+ REF "v${VERSION}"
+ SHA512 8b61c621ff2a6981b4ff89f7df577091ffc9382d443c061db612fb61822dbf6ef8aba69ea35d1c435dcffbd7434cb4ccc5d12bbe2deba1cf0a5316c979ee6a4b
+ 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 share/cmake/magic_enum PACKAGE_NAME magic_enum)
+vcpkg_fixup_pkgconfig()
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
+file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
diff --git a/vcpkg/ports/magic-enum/usage b/vcpkg/ports/magic-enum/usage
new file mode 100644
index 0000000..3d3a94b
--- /dev/null
+++ b/vcpkg/ports/magic-enum/usage
@@ -0,0 +1,4 @@
+magic-enum provides CMake targets:
+
+ find_package(magic_enum CONFIG REQUIRED)
+ target_link_libraries(main PRIVATE magic_enum::magic_enum)
diff --git a/vcpkg/ports/magic-enum/vcpkg.json b/vcpkg/ports/magic-enum/vcpkg.json
new file mode 100644
index 0000000..93cac6f
--- /dev/null
+++ b/vcpkg/ports/magic-enum/vcpkg.json
@@ -0,0 +1,18 @@
+{
+ "name": "magic-enum",
+ "version": "0.9.7",
+ "port-version": 1,
+ "description": "Header-only C++17 library provides static reflection for enums, work with any enum type without any macro or boilerplate code.",
+ "homepage": "https://github.com/Neargye/magic_enum",
+ "license": "MIT",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}