From 354733dbf8aa53571c7f7b451565742f42156339 Mon Sep 17 00:00:00 2001 From: myd7349 Date: Tue, 28 Jan 2020 06:07:04 +0800 Subject: [PATCH] [memorymodule] Add new port (#9541) * [memorymodule] Add new port * [memorymodule] Update ci baseline * [memorymodule] Update CI baseline * [memorymodule] Simplify vcpkg_fail_port_install call * [memorymodule] Install lib files only if they exist --- ports/memorymodule/CONTROL | 8 ++++++ ports/memorymodule/portfile.cmake | 45 +++++++++++++++++++++++++++++++ scripts/ci.baseline.txt | 4 +++ 3 files changed, 57 insertions(+) create mode 100644 ports/memorymodule/CONTROL create mode 100644 ports/memorymodule/portfile.cmake diff --git a/ports/memorymodule/CONTROL b/ports/memorymodule/CONTROL new file mode 100644 index 0000000000..ffc05ce9f9 --- /dev/null +++ b/ports/memorymodule/CONTROL @@ -0,0 +1,8 @@ +Source: memorymodule +Version: 2019-12-31 +Description: Library to load a DLL from memory +Homepage: https://github.com/fancycode/MemoryModule +Default-Features: unicode + +Feature: unicode +Description: Compile with UNICODE support diff --git a/ports/memorymodule/portfile.cmake b/ports/memorymodule/portfile.cmake new file mode 100644 index 0000000000..7c772711d5 --- /dev/null +++ b/ports/memorymodule/portfile.cmake @@ -0,0 +1,45 @@ +vcpkg_fail_port_install(ON_TARGET "Linux" "OSX" "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO fancycode/MemoryModule + REF 5f83e41c3a3e7c6e8284a5c1afa5a38790809461 + SHA512 6d42bd80dfeaf7bc662adafe7d6a7d7301eff5ea53bb59fce7e9c1a6ee22d31d2ab5696afc0a92c1501aa4161a60366418bfc3bed7ed2dcb6cae24243f4fa6d4 + HEAD_REF master +) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + unicode UNICODE +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DTESTSUITE=OFF + ${FEATURE_OPTIONS} +) + +vcpkg_build_cmake(TARGET MemoryModule) + +file(INSTALL ${SOURCE_PATH}/MemoryModule.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/MemoryModule.lib) + file(INSTALL + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/MemoryModule.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) +endif() + +if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/MemoryModule.lib) + file(INSTALL + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/MemoryModule.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index e17703b3be..7cf80edf09 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -1016,6 +1016,10 @@ mecab:x64-uwp = skip mecab:x64-windows = skip mecab:x64-windows-static = skip mecab:x86-windows = skip +memorymodule:arm-uwp=fail +memorymodule:x64-linux=fail +memorymodule:x64-osx=fail +memorymodule:x64-uwp=fail meschach:arm-uwp=fail meschach:x64-linux=fail meschach:x64-osx=fail