aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Marshall <xandan@gmail.com>2019-06-07 20:08:41 +0100
committerCurtis J Bezault <curtbezault@gmail.com>2019-06-07 12:08:41 -0700
commit1f3964f18b18bbffbf7064fe3ddc6d6f420d804b (patch)
tree84dfdf4ce466dfc9610f0d0c809e019701029cf4
parentb021f9db4aeea5fc6952b53034301e00356bb9de (diff)
downloadvcpkg-1f3964f18b18bbffbf7064fe3ddc6d6f420d804b.tar.gz
vcpkg-1f3964f18b18bbffbf7064fe3ddc6d6f420d804b.zip
[magic-enum] Add new port (#6817)
* [magic-enum] Add new port * Update portfile.cmake
-rw-r--r--ports/magic-enum/CONTROL3
-rw-r--r--ports/magic-enum/portfile.cmake22
2 files changed, 25 insertions, 0 deletions
diff --git a/ports/magic-enum/CONTROL b/ports/magic-enum/CONTROL
new file mode 100644
index 000000000..590b8d758
--- /dev/null
+++ b/ports/magic-enum/CONTROL
@@ -0,0 +1,3 @@
+Source: magic-enum
+Version: 2019-06-07
+Description: Header-only C++17 library provides static reflection for enums, work with any enum type without any macro or boilerplate code.
diff --git a/ports/magic-enum/portfile.cmake b/ports/magic-enum/portfile.cmake
new file mode 100644
index 000000000..95be6cc27
--- /dev/null
+++ b/ports/magic-enum/portfile.cmake
@@ -0,0 +1,22 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO "Neargye/magic_enum"
+ REF 4dfaa4b7b4814c2cf85b08ad3084fc28c8b129c6
+ SHA512 924e5a134f4200652fdc3f3d676b49efa8c30b5577d638f60134ce81092b23f7976a494ce50b58b25ed7bce0653a7e29206acf9e512408c4701ec6822ab2d176
+)
+
+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)
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib)
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/magic-enum RENAME copyright)