diff --git a/ports/trompeloeil/CONTROL b/ports/trompeloeil/CONTROL new file mode 100644 index 0000000000..4c7b96ec1a --- /dev/null +++ b/ports/trompeloeil/CONTROL @@ -0,0 +1,4 @@ +Source: trompeloeil +Version: 32-1 +Description: A thread-safe header-only mocking framework for C++11/14 using the Boost Software License 1.0 + For issues/pull requests/questions visit https://github.com/rollbear/trompeloeil diff --git a/ports/trompeloeil/disable_master_project.patch b/ports/trompeloeil/disable_master_project.patch new file mode 100644 index 0000000000..155363d7df --- /dev/null +++ b/ports/trompeloeil/disable_master_project.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6e59ab8..615a6cb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -34,9 +34,6 @@ target_include_directories( + ) + + set(MASTER_PROJECT OFF) +-if (${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_SOURCE_DIR}) +- set(MASTER_PROJECT ON) +-endif() + + if (MASTER_PROJECT AND CMAKE_BUILD_TYPE MATCHES Debug) + diff --git a/ports/trompeloeil/portfile.cmake b/ports/trompeloeil/portfile.cmake new file mode 100644 index 0000000000..a499ad4dea --- /dev/null +++ b/ports/trompeloeil/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO rollbear/trompeloeil + REF v32 + SHA512 001660b540880d9b1777d41ceb564b603a8d442649da86f9272e34cc642e10b43217ffadbc7d7fa7d32cb60dcc3daa0be17f86d5de48e8fce25f8681c645025d + HEAD_REF master + PATCHES disable_master_project.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/trompeloeil TARGET_PATH share/trompeloeil) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include/trompeloeil.hpp) + message(FATAL_ERROR "Main includes have moved. Please update the forwarder.") +endif() + +configure_file(${SOURCE_PATH}/LICENSE_1_0.txt ${CURRENT_PACKAGES_DIR}/share/trompeloeil/copyright COPYONLY)