From 218e9a3e4b8a7f51af465921ba76cdef4fe19ca2 Mon Sep 17 00:00:00 2001 From: myd7349 Date: Thu, 12 Sep 2019 01:14:22 +0800 Subject: [marl] Add new port (#8132) * [marl] Add new port * [marl] Fail fast with UWP --- ports/marl/CONTROL | 4 ++++ ports/marl/portfile.cmake | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 ports/marl/CONTROL create mode 100644 ports/marl/portfile.cmake diff --git a/ports/marl/CONTROL b/ports/marl/CONTROL new file mode 100644 index 000000000..e53b7aaa1 --- /dev/null +++ b/ports/marl/CONTROL @@ -0,0 +1,4 @@ +Source: marl +Version: 2019-09-11 +Description: A hybrid thread/fiber task scheduler written in C++ 11 +Homepage: https://github.com/google/marl diff --git a/ports/marl/portfile.cmake b/ports/marl/portfile.cmake new file mode 100644 index 000000000..de80a4c6b --- /dev/null +++ b/ports/marl/portfile.cmake @@ -0,0 +1,38 @@ +include(vcpkg_common_functions) + +if(VCPKG_TARGET_IS_UWP) + message(FATAL_ERROR "This port doesn't support UWP currently!") +endif() + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/marl + REF a2918916e74a929a881b18983a3a50e53aa9e1c2 + SHA512 7765f79066e27ba8ad656db4a3a3623d5e9e6c3784b22d53ae4b9450d351bcb7b1f08f2ca8387c80b48b9f4dd7b0fb48a69914d3afa683fb20f0c236353337ff + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DMARL_INSTALL=ON +) + +vcpkg_install_cmake() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/cmake) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +elseif(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/${PORT}) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# 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