From 6dfe4ade80917f951f2b1c5604b5ac8ff6c3013c Mon Sep 17 00:00:00 2001 From: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> Date: Fri, 11 Jun 2021 02:48:54 +0800 Subject: [unittest-cpp] fix config.cmake file (#17122) * [unittest-cpp] fix config.cmake file * update version * update vcpkg.json * update version --- ports/unittest-cpp/CONTROL | 4 ---- ports/unittest-cpp/fix-include-path.patch | 11 +++++++++++ ports/unittest-cpp/portfile.cmake | 4 +++- ports/unittest-cpp/vcpkg.json | 7 +++++++ versions/baseline.json | 4 ++-- versions/u-/unittest-cpp.json | 5 +++++ 6 files changed, 28 insertions(+), 7 deletions(-) delete mode 100644 ports/unittest-cpp/CONTROL create mode 100644 ports/unittest-cpp/fix-include-path.patch create mode 100644 ports/unittest-cpp/vcpkg.json diff --git a/ports/unittest-cpp/CONTROL b/ports/unittest-cpp/CONTROL deleted file mode 100644 index 195b41fe4..000000000 --- a/ports/unittest-cpp/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: unittest-cpp -Version: 2.0.0-1 -Homepage: https://github.com/unittest-cpp/unittest-cpp -Description: A lightweight unit testing framework for C++ diff --git a/ports/unittest-cpp/fix-include-path.patch b/ports/unittest-cpp/fix-include-path.patch new file mode 100644 index 000000000..32455dec5 --- /dev/null +++ b/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/ports/unittest-cpp/portfile.cmake b/ports/unittest-cpp/portfile.cmake index e54daf77d..4558d8a17 100644 --- a/ports/unittest-cpp/portfile.cmake +++ b/ports/unittest-cpp/portfile.cmake @@ -6,6 +6,8 @@ vcpkg_from_github( REF v2.0.0 SHA512 39318f4ed31534c116679a3257bf1438a6c4b3bef1894dfd40aea934950c6c8197af6a7f61539b8e9ddc67327c9388d7e8a6f8a3e0e966ad26c07554e2429cab HEAD_REF master + PATCHES + fix-include-path.patch ) vcpkg_configure_cmake( @@ -19,7 +21,7 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/UnitTest++) file(RENAME ${CURRENT_PACKAGES_DIR}/share/unittest-cpp ${CURRENT_PACKAGES_DIR}/share/unittest++) # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/unittest-cpp RENAME 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) diff --git a/ports/unittest-cpp/vcpkg.json b/ports/unittest-cpp/vcpkg.json new file mode 100644 index 000000000..b80cbbad5 --- /dev/null +++ b/ports/unittest-cpp/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "unittest-cpp", + "version-semver": "2.0.0", + "port-version": 2, + "description": "A lightweight unit testing framework for C++", + "homepage": "https://github.com/unittest-cpp/unittest-cpp" +} diff --git a/versions/baseline.json b/versions/baseline.json index 1a318b0c5..101d9974f 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6373,8 +6373,8 @@ "port-version": 0 }, "unittest-cpp": { - "baseline": "2.0.0-1", - "port-version": 0 + "baseline": "2.0.0", + "port-version": 2 }, "unixodbc": { "baseline": "2.3.7", diff --git a/versions/u-/unittest-cpp.json b/versions/u-/unittest-cpp.json index f4ac48856..fe90fa829 100644 --- a/versions/u-/unittest-cpp.json +++ b/versions/u-/unittest-cpp.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "22f6d4e1405162f02c4d25e742fcf0dcc0503146", + "version-semver": "2.0.0", + "port-version": 2 + }, { "git-tree": "3ba07fcecec6bf9298a04b064411601043d98bd7", "version-string": "2.0.0-1", -- cgit v1.2.3