summaryrefslogtreecommitdiff
path: root/indra/cmake/GoogleMock.cmake
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2023-04-07 00:20:59 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2023-04-07 00:20:59 +0300
commitf1095d78315818642e62b7f4af9984557e176b5d (patch)
tree3606970e28e1101befbc7b42ccd6033cfd839e7b /indra/cmake/GoogleMock.cmake
parent4042ed9701fcfa42c03fc285a757aa348f800e33 (diff)
parentc7053a6928fd5eafdc935453742e92951ae4e0c1 (diff)
Merge branch 'main' into marchcat/main-contrib-merge
# Conflicts: # indra/cmake/CMakeLists.txt # indra/llcommon/llsdserialize.cpp # indra/llcommon/llsdserialize.h # indra/llcommon/tests/llleap_test.cpp # indra/newview/llfilepicker.h # indra/newview/llfilepicker_mac.h # indra/newview/llfilepicker_mac.mm # indra/newview/skins/default/xui/en/strings.xml
Diffstat (limited to 'indra/cmake/GoogleMock.cmake')
-rw-r--r--indra/cmake/GoogleMock.cmake32
1 files changed, 18 insertions, 14 deletions
diff --git a/indra/cmake/GoogleMock.cmake b/indra/cmake/GoogleMock.cmake
index 5a00546927..e4520fe96e 100644
--- a/indra/cmake/GoogleMock.cmake
+++ b/indra/cmake/GoogleMock.cmake
@@ -2,27 +2,31 @@
include(Prebuilt)
include(Linking)
+include_guard()
+
+add_library( ll::googlemock INTERFACE IMPORTED )
+if(USE_CONAN)
+ target_link_libraries( ll::googlemock INTERFACE CONAN_PKG::gtest )
+
+ #Not very nice, but for the moment we need this for tut.hpp
+ target_include_directories( ll::googlemock SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include )
+ return()
+endif()
+
use_prebuilt_binary(googlemock)
-set(GOOGLEMOCK_INCLUDE_DIRS
- ${LIBS_PREBUILT_DIR}/include)
+target_include_directories( ll::googlemock SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include )
if (LINUX)
# VWR-24366: gmock is underlinked, it needs gtest.
- set(GOOGLEMOCK_LIBRARIES
- gmock -Wl,--no-as-needed
- gtest -Wl,--as-needed)
+ target_link_libraries( ll::googlemock INTERFACE gmock gtest)
elseif(WINDOWS)
- set(GOOGLEMOCK_LIBRARIES
- gmock)
- set(GOOGLEMOCK_INCLUDE_DIRS
- ${LIBS_PREBUILT_DIR}/include
- ${LIBS_PREBUILT_DIR}/include/gmock
- ${LIBS_PREBUILT_DIR}/include/gmock/boost/tr1/tr1)
+ target_link_libraries( ll::googlemock INTERFACE gmock)
+ target_include_directories( ll::googlemock SYSTEM INTERFACE
+ ${LIBS_PREBUILT_DIR}/include
+ ${LIBS_PREBUILT_DIR}/include/gmock)
elseif(DARWIN)
- set(GOOGLEMOCK_LIBRARIES
- gmock
- gtest)
+ target_link_libraries( ll::googlemock INTERFACE gmock gtest)
endif(LINUX)