Blame SOURCES/abseil-cpp-20210324-gtest.patch

rdobuilder b47e81
diff -up ./CMakeLists.txt.2 ./CMakeLists.txt
rdobuilder b47e81
--- ./CMakeLists.txt.2	2021-04-20 12:55:14.000000000 -0400
rdobuilder b47e81
+++ ./CMakeLists.txt	2021-05-21 22:26:12.910191071 -0400
rdobuilder b47e81
@@ -127,6 +127,22 @@ if(BUILD_TESTING)
rdobuilder b47e81
       set(absl_gtest_src_dir ${ABSL_LOCAL_GOOGLETEST_DIR})
rdobuilder b47e81
     endif()
rdobuilder b47e81
     include(CMake/Googletest/DownloadGTest.cmake)
rdobuilder b47e81
+  else()
rdobuilder b47e81
+    # Set up gtest targets
rdobuilder b47e81
+    find_library(GTEST_LIB gtest)
rdobuilder b47e81
+    add_library(gtest UNKNOWN IMPORTED)
rdobuilder b47e81
+    set_target_properties(gtest PROPERTIES IMPORTED_LOCATION ${GTEST_LIB})
rdobuilder b47e81
+    find_library(GTEST_MAIN_LIB gtest_main)
rdobuilder b47e81
+    add_library(gtest_main UNKNOWN IMPORTED)
rdobuilder b47e81
+    set_target_properties(gtest_main PROPERTIES IMPORTED_LOCATION ${GTEST_MAIN_LIB} INTERFACE_LINK_LIBRARIES gtest)
rdobuilder b47e81
+    
rdobuilder b47e81
+    # Set up gmock targets
rdobuilder b47e81
+    find_library(GMOCK_LIB gmock)
rdobuilder b47e81
+    add_library(gmock UNKNOWN IMPORTED)
rdobuilder b47e81
+    set_target_properties(gmock PROPERTIES IMPORTED_LOCATION ${GMOCK_LIB} INTERFACE_LINK_LIBRARIES gtest)
rdobuilder b47e81
+    find_library(GMOCK_MAIN_LIB gmock_main)
rdobuilder b47e81
+    add_library(gmock_main UNKNOWN IMPORTED)
rdobuilder b47e81
+    set_target_properties(gmock_main PROPERTIES IMPORTED_LOCATION ${GMOCK_MAIN_LIB} INTERFACE_LINK_LIBRARIES "gmock;Threads::Threads")
rdobuilder b47e81
   endif()
rdobuilder b47e81
 
rdobuilder b47e81
   check_target(gtest)