From 89cd3d15da7e3ceaffb69ec0011453d8999ba557 Mon Sep 17 00:00:00 2001 From: myd7349 Date: Mon, 22 Jul 2019 14:21:29 +0800 Subject: [PATCH] [cmcstl2] Add new port (#7348) --- ports/cmcstl2/CONTROL | 4 ++++ ports/cmcstl2/portfile.cmake | 31 +++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 ports/cmcstl2/CONTROL create mode 100644 ports/cmcstl2/portfile.cmake diff --git a/ports/cmcstl2/CONTROL b/ports/cmcstl2/CONTROL new file mode 100644 index 0000000000..42b652ce4d --- /dev/null +++ b/ports/cmcstl2/CONTROL @@ -0,0 +1,4 @@ +Source: cmcstl2 +Version: 2019-07-20 +Description: An implementation of C++ Extensions for Ranges +Homepage: https://github.com/CaseyCarter/cmcstl2 diff --git a/ports/cmcstl2/portfile.cmake b/ports/cmcstl2/portfile.cmake new file mode 100644 index 0000000000..e2a0b9a3f5 --- /dev/null +++ b/ports/cmcstl2/portfile.cmake @@ -0,0 +1,31 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO CaseyCarter/cmcstl2 + REF cca84b9fd362ea37334ccbe09a66be4121768ac9 + SHA512 a528dda26964a8c29f2bf7ddb24a861f337246e9ab2bda19f62d4ca107951aa77e37070623db3b5574973404ccf2f201bc2020654b3d53de36d8a22de521e5b9 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSTL2_BUILD_EXAMPLES=OFF + -DSTL2_BUILD_TESTING=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.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME ${PORT})