From e6918187568dbd01842d8d1d2c808ce16a894239 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 21 Apr 2024 13:54:28 +0200 Subject: Adding upstream version 18.2.2. Signed-off-by: Daniel Baumann --- cmake/modules/FindGMock.cmake | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 cmake/modules/FindGMock.cmake (limited to 'cmake/modules/FindGMock.cmake') diff --git a/cmake/modules/FindGMock.cmake b/cmake/modules/FindGMock.cmake new file mode 100644 index 000000000..ea53f6481 --- /dev/null +++ b/cmake/modules/FindGMock.cmake @@ -0,0 +1,21 @@ +find_path(GMock_INCLUDE_DIR NAMES gmock/gmock.h) +find_library(GMock_GMock_LIBRARY NAMES gmock) +find_library(GMock_Main_LIBRARY NAMES gmock_main) + +find_package_handle_standard_args(GMock + REQUIRED_VARS + GMock_GMock_LIBRARY + GMock_Main_LIBRARY + GMock_INCLUDE_DIR) + +if(GMock_FOUND) + foreach(c GMock Main) + if(NOT TARGET GMock::${c}) + add_library(GMock::${c} UNKNOWN IMPORTED) + set_target_properties(GMock::${c} PROPERTIES + IMPORTED_LOCATION "${GMock_${c}_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${GMock_INCLUDE_DIR}" + IMPORTED_LINK_INTERFACE_LANGUAGES "CXX") + endif() + endforeach() +endif() -- cgit v1.2.3