From 584da54a0f56943286efef6b25ccc8582e3fe8d4 Mon Sep 17 00:00:00 2001 From: myd7349 Date: Thu, 18 Jul 2019 15:15:56 +0800 Subject: [nameof] Add new port (#7250) --- ports/nameof/CONTROL | 4 ++++ ports/nameof/portfile.cmake | 31 +++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 ports/nameof/CONTROL create mode 100644 ports/nameof/portfile.cmake diff --git a/ports/nameof/CONTROL b/ports/nameof/CONTROL new file mode 100644 index 000000000..35df482a0 --- /dev/null +++ b/ports/nameof/CONTROL @@ -0,0 +1,4 @@ +Source: nameof +Version: 2019-07-13 +Description: Nameof operator for modern C++ +Homepage: https://github.com/Neargye/nameof diff --git a/ports/nameof/portfile.cmake b/ports/nameof/portfile.cmake new file mode 100644 index 000000000..21dcf1b97 --- /dev/null +++ b/ports/nameof/portfile.cmake @@ -0,0 +1,31 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Neargye/nameof + REF 9d335128265e443acf4e12ed40327e166cd8e3da + SHA512 3d4af0069fc3dbf9a4a79ae1bea282cafb69606936a66bf43b5a13ae2f0cbc88e98dbb02a12e9c211afd73d9807b36a6f09635a1922ce5faaeb2a148672a0b13 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DNAMEOF_OPT_BUILD_EXAMPLES=OFF + -DNAMEOF_OPT_BUILD_TESTS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +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) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME ${PORT}) -- cgit v1.2.3