diff options
| author | Alexander Neumann <alexander.neumann@hamburg.de> | 2019-09-20 12:24:23 +0200 |
|---|---|---|
| committer | Alexander Neumann <alexander.neumann@hamburg.de> | 2019-09-20 12:24:23 +0200 |
| commit | 5b1e426929b40a9b60809284993b424b841a28fc (patch) | |
| tree | bd12300ad859bababb7d4acc03700fd31949fddc /ports/gtest | |
| parent | 279e25aecfe30f55296881ea9b0236c1d6ee030a (diff) | |
| parent | 358ec0954d9b71b0def4fd4b4dbafdd0b8478d81 (diff) | |
| download | vcpkg-5b1e426929b40a9b60809284993b424b841a28fc.tar.gz vcpkg-5b1e426929b40a9b60809284993b424b841a28fc.zip | |
Merge remote-tracking branch 'upstream/master' into path_separator
# Conflicts:
# scripts/cmake/vcpkg_common_definitions.cmake
Diffstat (limited to 'ports/gtest')
| -rw-r--r-- | ports/gtest/CONTROL | 2 | ||||
| -rw-r--r-- | ports/gtest/fix-main-lib-path.patch | 68 | ||||
| -rw-r--r-- | ports/gtest/portfile.cmake | 3 | ||||
| -rw-r--r-- | ports/gtest/usage | 6 |
4 files changed, 75 insertions, 4 deletions
diff --git a/ports/gtest/CONTROL b/ports/gtest/CONTROL index 97b5ad3a8..07f5f8a2e 100644 --- a/ports/gtest/CONTROL +++ b/ports/gtest/CONTROL @@ -1,4 +1,4 @@ Source: gtest -Version: 2019-08-14 +Version: 2019-08-14-2 Homepage: https://github.com/google/googletest Description: GoogleTest and GoogleMock testing frameworks. diff --git a/ports/gtest/fix-main-lib-path.patch b/ports/gtest/fix-main-lib-path.patch new file mode 100644 index 000000000..e07806eec --- /dev/null +++ b/ports/gtest/fix-main-lib-path.patch @@ -0,0 +1,68 @@ +diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt +index 3e72d75..9d135ff 100644 +--- a/googlemock/CMakeLists.txt ++++ b/googlemock/CMakeLists.txt +@@ -115,7 +115,8 @@ endif() + ######################################################################## + # + # Install rules +-install_project(gmock gmock_main) ++install_project(gmock) ++install_project(gmock_main) + + ######################################################################## + # +diff --git a/googletest/CMakeLists.txt b/googletest/CMakeLists.txt +index e33718b..a049c2c 100644 +--- a/googletest/CMakeLists.txt ++++ b/googletest/CMakeLists.txt +@@ -136,7 +136,8 @@ target_link_libraries(gtest_main PUBLIC gtest) + ######################################################################## + # + # Install rules +-install_project(gtest gtest_main) ++install_project(gtest) ++install_project(gtest_main) + + ######################################################################## + # +diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake +index 69defc8..cf7295a 100644 +--- a/googletest/cmake/internal_utils.cmake ++++ b/googletest/cmake/internal_utils.cmake +@@ -317,11 +317,15 @@ function(install_project) + install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/" + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") + # Install the project targets. ++ set (LIB_INSTALL_DST ${CMAKE_INSTALL_LIBDIR}) ++ if (${ARGN} MATCHES "_main") ++ set (LIB_INSTALL_DST ${CMAKE_INSTALL_LIBDIR}/manual-link) ++ endif() + install(TARGETS ${ARGN} + EXPORT ${targets_export_name} + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" +- ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" +- LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") ++ ARCHIVE DESTINATION "${LIB_INSTALL_DST}" ++ LIBRARY DESTINATION "${LIB_INSTALL_DST}") + if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + # Install PDBs + foreach(t ${ARGN}) +@@ -330,7 +334,7 @@ function(install_project) + get_target_property(t_pdb_output_directory ${t} PDB_OUTPUT_DIRECTORY) + install(FILES + "${t_pdb_output_directory}/\${CMAKE_INSTALL_CONFIG_NAME}/$<$<CONFIG:Debug>:${t_pdb_name_debug}>$<$<NOT:$<CONFIG:Debug>>:${t_pdb_name}>.pdb" +- DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ DESTINATION ${LIB_INSTALL_DST} + OPTIONAL) + endforeach() + endif() +@@ -340,7 +344,7 @@ function(install_project) + configure_file("${PROJECT_SOURCE_DIR}/cmake/${t}.pc.in" + "${configured_pc}" @ONLY) + install(FILES "${configured_pc}" +- DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") ++ DESTINATION "${LIB_INSTALL_DST}/pkgconfig") + endforeach() + endif() + endfunction() diff --git a/ports/gtest/portfile.cmake b/ports/gtest/portfile.cmake index c6fd0162c..3679ba873 100644 --- a/ports/gtest/portfile.cmake +++ b/ports/gtest/portfile.cmake @@ -11,7 +11,8 @@ vcpkg_from_github( SHA512 fc874a7977f11be58dc63993b520b4ae6ca43654fb5250c8b56df62a21f4dca8fcbdc81dfa106374b2bb7c59bc88952fbfc0e3ae4c7d63fdb502afbaeb39c822 HEAD_REF master PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0002-Fix-z7-override.patch + 0002-Fix-z7-override.patch + fix-main-lib-path.patch ) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" GTEST_FORCE_SHARED_CRT) diff --git a/ports/gtest/usage b/ports/gtest/usage index d40782e0e..3ed194453 100644 --- a/ports/gtest/usage +++ b/ports/gtest/usage @@ -1,6 +1,8 @@ The package gtest is compatible with built-in CMake targets:
enable_testing()
- find_package(GTest MODULE REQUIRED)
- target_link_libraries(main PRIVATE GTest::GTest GTest::Main)
+
+ find_package(GTest CONFIG REQUIRED)
+ target_link_libraries(main PRIVATE GTest::gtest GTest::gtest_main GTest::gmock GTest::gmock_main)
+
add_test(AllTestsInMain main)
|
