diff options
author | Nicky <nicky.dasmijn@gmail.com> | 2022-04-13 19:21:55 +0200 |
---|---|---|
committer | Nicky <nicky.dasmijn@gmail.com> | 2022-04-13 19:21:55 +0200 |
commit | 241919e7f7986c11586a49bff53cf19c2c0e0ea6 (patch) | |
tree | dfd7f4fa971fd77c89eaaa140ba1e53b910b24aa /indra/cmake/GoogleMock.cmake | |
parent | 2c9ede0ccc3b6a27ca418fcb6e7a91eb87b261e9 (diff) |
Rework cmake, the original plan was to maybe be able to use conan targets with the same name (that's why 3ps had names like apr::apr),
but it's safer and saner to put the LL 3ps under the ll:: prefix.
This also allows means it is possible to get rid of that bad "if( TRAGET ...) return() endif()" pattern and rather use include_guard().
Diffstat (limited to 'indra/cmake/GoogleMock.cmake')
-rw-r--r-- | indra/cmake/GoogleMock.cmake | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/indra/cmake/GoogleMock.cmake b/indra/cmake/GoogleMock.cmake index 821346ced6..1f161ec4ff 100644 --- a/indra/cmake/GoogleMock.cmake +++ b/indra/cmake/GoogleMock.cmake @@ -2,27 +2,26 @@ include(Prebuilt) include(Linking) +include_guard() + use_prebuilt_binary(googlemock) -if( TARGET googlemock::googlemock ) - return() -endif() -create_target( googlemock::googlemock ) -set_target_include_dirs( googlemock::googlemock +create_target( ll::googlemock ) +set_target_include_dirs( ll::googlemock ${LIBS_PREBUILT_DIR}/include ) if (LINUX) # VWR-24366: gmock is underlinked, it needs gtest. - set_target_libraries( googlemock::googlemock gmock gtest) + set_target_libraries( ll::googlemock gmock gtest) elseif(WINDOWS) - set_target_libraries( googlemock::googlemock gmock) - set_target_include_dirs( googlemock::googlemock + set_target_libraries( ll::googlemock gmock) + set_target_include_dirs( ll::googlemock ${LIBS_PREBUILT_DIR}/include ${LIBS_PREBUILT_DIR}/include/gmock) elseif(DARWIN) - set_target_libraries( googlemock::googlemock gmock gtest) + set_target_libraries( ll::googlemock gmock gtest) endif(LINUX) |