diff options
-rw-r--r-- | indra/cmake/GoogleMock.cmake | 29 | ||||
-rw-r--r-- | indra/cmake/LLAddBuildTest.cmake | 15 | ||||
-rw-r--r-- | indra/llmath/CMakeLists.txt | 5 | ||||
-rw-r--r-- | indra/test/CMakeLists.txt | 1 |
4 files changed, 22 insertions, 28 deletions
diff --git a/indra/cmake/GoogleMock.cmake b/indra/cmake/GoogleMock.cmake index 5a00546927..58975df62e 100644 --- a/indra/cmake/GoogleMock.cmake +++ b/indra/cmake/GoogleMock.cmake @@ -4,25 +4,26 @@ include(Linking) use_prebuilt_binary(googlemock) -set(GOOGLEMOCK_INCLUDE_DIRS - ${LIBS_PREBUILT_DIR}/include) +if( TARGET googlemock::googlemock ) + return() +endif() +create_target( googlemock::googlemock ) +set_target_include_dirs( googlemock::googlemock + ${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) + set_target_libraries( googlemock::googlemock 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) + set_target_libraries( googlemock::googlemock gmock) + set_target_include_dirs( googlemock::googlemock + ${LIBS_PREBUILT_DIR}/include + ${LIBS_PREBUILT_DIR}/include/gmock + ${LIBS_PREBUILT_DIR}/include/gmock/boost/tr1/tr1 ) + elseif(DARWIN) - set(GOOGLEMOCK_LIBRARIES - gmock - gtest) + set_target_libraries( googlemock::googlemock gmock gtest) endif(LINUX) diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index 6860b1f316..1a8003ea7f 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -45,7 +45,7 @@ INCLUDE(GoogleMock) ) SET(alltest_LIBRARIES llcommon - ${GOOGLEMOCK_LIBRARIES} + googlemock::googlemock ${PTHREAD_LIBRARY} ${WINDOWS_LIBRARIES} ) @@ -206,14 +206,11 @@ FUNCTION(LL_ADD_INTEGRATION_TEST ) SET(libraries - ${LEGACY_STDIO_LIBS} - ${library_dependencies} - ${BOOST_FIBER_LIBRARY} - ${BOOST_CONTEXT_LIBRARY} - ${BOOST_SYSTEM_LIBRARY} - ${GOOGLEMOCK_LIBRARIES} - ${PTHREAD_LIBRARY} - ) + ${LEGACY_STDIO_LIBS} + ${library_dependencies} + googlemock::googlemock + ${PTHREAD_LIBRARY} + ) # Add test executable build target if(TEST_DEBUG) diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt index c385a4cff6..fd7b831719 100644 --- a/indra/llmath/CMakeLists.txt +++ b/indra/llmath/CMakeLists.txt @@ -7,11 +7,6 @@ include(LLCommon) include(bugsplat) include(Boost) -include_directories( - ${LLCOMMON_INCLUDE_DIRS} - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ) - set(llmath_SOURCE_FILES llbbox.cpp llbboxlocal.cpp diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index b607980bae..6d04c3b76b 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -74,6 +74,7 @@ target_link_libraries(lltest llxml llcommon llcorehttp + googlemock::googlemock ${WINDOWS_LIBRARIES} ${DL_LIBRARY} ) |