aboutsummaryrefslogtreecommitdiff
path: root/ports/gtest/fix-main-lib-path.patch
diff options
context:
space:
mode:
authorPhil Christensen <philc@microsoft.com>2019-08-23 11:18:34 -0700
committerGitHub <noreply@github.com>2019-08-23 11:18:34 -0700
commitbd4678610b221ae6cd4911295e84808ea7924cc6 (patch)
tree1e51033d924c41cd147f33665990b75fe19ff4b7 /ports/gtest/fix-main-lib-path.patch
parent1245f1dbfc383d33b2fa576f010644de9687280e (diff)
parentcf447c050c734fc71e5254ea9e05e1bc4a9d208d (diff)
downloadvcpkg-bd4678610b221ae6cd4911295e84808ea7924cc6.tar.gz
vcpkg-bd4678610b221ae6cd4911295e84808ea7924cc6.zip
Merge branch 'master' into multi_line_depends
Diffstat (limited to 'ports/gtest/fix-main-lib-path.patch')
-rw-r--r--ports/gtest/fix-main-lib-path.patch68
1 files changed, 68 insertions, 0 deletions
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()