File 2051-src-googletest-nosharedlibs.patch of Package ceph-ceph-20.2.0+20260219.ea3e6758

diff --git a/src/googletest/googlemock/CMakeLists.txt b/src/googletest/googlemock/CMakeLists.txt
index 99b2411f3..e3271c5e1 100644
--- a/src/googletest/googlemock/CMakeLists.txt
+++ b/src/googletest/googlemock/CMakeLists.txt
@@ -49,6 +49,7 @@ endif()
 # if they are the same (the default).
 add_subdirectory("${gtest_dir}" "${gmock_BINARY_DIR}/${gtest_dir}")
 
+option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF)
 
 # These commands only run if this is the main project
 if(CMAKE_PROJECT_NAME STREQUAL "gmock" OR CMAKE_PROJECT_NAME STREQUAL "googletest-distribution")
@@ -96,7 +97,6 @@ if (MSVC)
 else()
   cxx_library(gmock "${cxx_strict}" src/gmock-all.cc)
   target_link_libraries(gmock PUBLIC gtest)
-  set_target_properties(gmock PROPERTIES VERSION ${GOOGLETEST_VERSION})
   cxx_library(gmock_main "${cxx_strict}" src/gmock_main.cc)
   target_link_libraries(gmock_main PUBLIC gmock)
   set_target_properties(gmock_main PROPERTIES VERSION ${GOOGLETEST_VERSION})
diff --git a/src/googletest/googletest/CMakeLists.txt b/src/googletest/googletest/CMakeLists.txt
index dce6a7c9e..e45cb26f8 100644
--- a/src/googletest/googletest/CMakeLists.txt
+++ b/src/googletest/googletest/CMakeLists.txt
@@ -53,6 +53,8 @@ if (COMMAND set_up_hermetic_build)
   set_up_hermetic_build()
 endif()
 
+option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF)
+
 # These commands only run if this is the main project.
 if(CMAKE_PROJECT_NAME STREQUAL "gtest" OR CMAKE_PROJECT_NAME STREQUAL "googletest-distribution")
 
@@ -121,7 +123,6 @@ include_directories(${gtest_build_include_dirs})
 # are used for other targets, to ensure that gtest can be compiled by a user
 # aggressive about warnings.
 cxx_library(gtest "${cxx_strict}" src/gtest-all.cc)
-set_target_properties(gtest PROPERTIES VERSION ${GOOGLETEST_VERSION})
 if(GTEST_HAS_ABSL)
   target_compile_definitions(gtest PUBLIC GTEST_HAS_ABSL=1)
   target_link_libraries(gtest PUBLIC
@@ -139,7 +140,6 @@ if(GTEST_HAS_ABSL)
   )
 endif()
 cxx_library(gtest_main "${cxx_strict}" src/gtest_main.cc)
-set_target_properties(gtest_main PROPERTIES VERSION ${GOOGLETEST_VERSION})
 string(REPLACE ";" "$<SEMICOLON>" dirs "${gtest_build_include_dirs}")
 target_include_directories(gtest SYSTEM INTERFACE
   "$<BUILD_INTERFACE:${dirs}>"
openSUSE Build Service is sponsored by