Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[unittest-cpp] fix config.cmake file (microsoft#17122)
* [unittest-cpp] fix config.cmake file

* update version

* update vcpkg.json

* update version
  • Loading branch information
JonLiu1993 committed Jun 10, 2021
1 parent 4a753ba commit 6dfe4ad
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 7 deletions.
4 changes: 0 additions & 4 deletions ports/unittest-cpp/CONTROL

This file was deleted.

11 changes: 11 additions & 0 deletions 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
4 changes: 3 additions & 1 deletion ports/unittest-cpp/portfile.cmake
Expand Up @@ -6,6 +6,8 @@ vcpkg_from_github(
REF v2.0.0
SHA512 39318f4ed31534c116679a3257bf1438a6c4b3bef1894dfd40aea934950c6c8197af6a7f61539b8e9ddc67327c9388d7e8a6f8a3e0e966ad26c07554e2429cab
HEAD_REF master
PATCHES
fix-include-path.patch
)

vcpkg_configure_cmake(
Expand All @@ -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)
7 changes: 7 additions & 0 deletions 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"
}
4 changes: 2 additions & 2 deletions versions/baseline.json
Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions 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",
Expand Down

0 comments on commit 6dfe4ad

Please sign in to comment.