diff options
Diffstat (limited to 'vcpkg/ports/unittest-cpp')
| -rw-r--r-- | vcpkg/ports/unittest-cpp/fix-include-path.patch | 11 | ||||
| -rw-r--r-- | vcpkg/ports/unittest-cpp/portfile.cmake | 30 | ||||
| -rw-r--r-- | vcpkg/ports/unittest-cpp/vcpkg.json | 17 |
3 files changed, 58 insertions, 0 deletions
diff --git a/vcpkg/ports/unittest-cpp/fix-include-path.patch b/vcpkg/ports/unittest-cpp/fix-include-path.patch new file mode 100644 index 0000000..32455de --- /dev/null +++ b/vcpkg/ports/unittest-cpp/fix-include-path.patch @@ -0,0 +1,11 @@ +diff --git a/cmake/UnitTest++Config.cmake b/cmake/UnitTest++Config.cmake
+index afe165c..cc43a2b 100644
+--- a/cmake/UnitTest++Config.cmake
++++ b/cmake/UnitTest++Config.cmake
+@@ -1,2 +1,4 @@
+ include("${CMAKE_CURRENT_LIST_DIR}/UnitTest++Targets.cmake")
+-get_filename_component(UTPP_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/../../../include/" ABSOLUTE)
++get_filename_component(UTPP_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/../../include/" ABSOLUTE)
++
++get_filename_component(UnitTest++_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/../../include/" ABSOLUTE)
+\ No newline at end of file
diff --git a/vcpkg/ports/unittest-cpp/portfile.cmake b/vcpkg/ports/unittest-cpp/portfile.cmake new file mode 100644 index 0000000..664cea7 --- /dev/null +++ b/vcpkg/ports/unittest-cpp/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO unittest-cpp/unittest-cpp
+ REF v2.0.0
+ SHA512 39318f4ed31534c116679a3257bf1438a6c4b3bef1894dfd40aea934950c6c8197af6a7f61539b8e9ddc67327c9388d7e8a6f8a3e0e966ad26c07554e2429cab
+ HEAD_REF master
+ PATCHES
+ fix-include-path.patch
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DUTPP_INCLUDE_TESTS_IN_BUILD=OFF
+ -DUTPP_AMPLIFY_WARNINGS=OFF
+)
+
+vcpkg_cmake_install()
+
+vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/UnitTest++ PACKAGE_NAME unittest++)
+
+# Handle copyright
+file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
+
+# Remove duplicate includes
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+vcpkg_fixup_pkgconfig()
diff --git a/vcpkg/ports/unittest-cpp/vcpkg.json b/vcpkg/ports/unittest-cpp/vcpkg.json new file mode 100644 index 0000000..2a5211f --- /dev/null +++ b/vcpkg/ports/unittest-cpp/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "unittest-cpp", + "version-semver": "2.0.0", + "port-version": 6, + "description": "A lightweight unit testing framework for C++", + "homepage": "https://github.com/unittest-cpp/unittest-cpp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |