Skip to content

Commit

Permalink
Ensure Debug version of GMock library is added to imported target
Browse files Browse the repository at this point in the history
(cherry picked from commit dcf61dfe783fe808c76d102e6639ed0be77d5932)
  • Loading branch information
AnyOldName3 committed Nov 21, 2021
1 parent 10b3ca8 commit a9877ae
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions cmake/FindGMock.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a9877ae

Please sign in to comment.