aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Patro <maciejpatro@gmail.com>2018-10-23 18:47:58 +0200
committerRobert Schumacher <roschuma@microsoft.com>2018-10-23 09:47:58 -0700
commit4a11ac2d5d17555c95f32bfbe2662b918f53d250 (patch)
treeaaacf48dd5a9dce693d4e70612d539debf0ed410
parent473d63c4edf1ab704b597abc4987372712b005f6 (diff)
downloadvcpkg-4a11ac2d5d17555c95f32bfbe2662b918f53d250.tar.gz
vcpkg-4a11ac2d5d17555c95f32bfbe2662b918f53d250.zip
[trompeloeil] add new port (#4524)
* [trompeloeil] add new port * [trompeloeil] Modernize
-rw-r--r--ports/trompeloeil/CONTROL4
-rw-r--r--ports/trompeloeil/disable_master_project.patch14
-rw-r--r--ports/trompeloeil/portfile.cmake29
3 files changed, 47 insertions, 0 deletions
diff --git a/ports/trompeloeil/CONTROL b/ports/trompeloeil/CONTROL
new file mode 100644
index 000000000..4c7b96ec1
--- /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 000000000..155363d7d
--- /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 000000000..a499ad4de
--- /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)