summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnyOldName3 <krizdjali+gitlab@gmail.com>2021-11-13 18:19:14 +0000
committerAnyOldName3 <krizdjali+gitlab@gmail.com>2021-11-21 22:45:10 +0000
commita9877aea984243bc04cf26b80320a7d96c22124f (patch)
tree2371322641233cf2e204874aa23e68d19d79435f
parent10b3ca8194295f5d5038fc658ee3b231e7171d8d (diff)
Ensure Debug version of GMock library is added to imported target6332-when-building-the-openmw-test-suite-using-the-visual-studio-2019-solution-in-debug-it-uses
(cherry picked from commit dcf61dfe783fe808c76d102e6639ed0be77d5932)
-rw-r--r--cmake/FindGMock.cmake12
1 files changed, 10 insertions, 2 deletions
diff --git a/cmake/FindGMock.cmake b/cmake/FindGMock.cmake
index 6b3caf543e..bc3410969f 100644
--- a/cmake/FindGMock.cmake
+++ b/cmake/FindGMock.cmake
@@ -164,8 +164,16 @@ find_dependency(Threads)
set_target_properties(GMock::GMock PROPERTIES
INTERFACE_LINK_LIBRARIES "Threads::Threads"
- IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
- IMPORTED_LOCATION "${GMOCK_LIBRARY}")
+ IMPORTED_LINK_INTERFACE_LANGUAGES "CXX")
+
+if(EXISTS "${GMOCK_LIBRARY}")
+ set_target_properties(GMock::GMock PROPERTIES
+ IMPORTED_LOCATION "${GMOCK_LIBRARY}")
+endif()
+if(EXISTS "${GMOCK_LIBRARY_DEBUG}")
+ set_target_properties(GMock::GMock PROPERTIES
+ IMPORTED_LOCATION_DEBUG "${GMOCK_LIBRARY_DEBUG}")
+endif()
if(GMOCK_INCLUDE_DIR)
set_target_properties(GMock::GMock PROPERTIES