diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 18:24:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 18:24:20 +0000 |
commit | 483eb2f56657e8e7f419ab1a4fab8dce9ade8609 (patch) | |
tree | e5d88d25d870d5dedacb6bbdbe2a966086a0a5cf /cmake/modules/FindGMock.cmake | |
parent | Initial commit. (diff) | |
download | ceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.tar.xz ceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.zip |
Adding upstream version 14.2.21.upstream/14.2.21upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'cmake/modules/FindGMock.cmake')
-rw-r--r-- | cmake/modules/FindGMock.cmake | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/cmake/modules/FindGMock.cmake b/cmake/modules/FindGMock.cmake new file mode 100644 index 00000000..ea53f648 --- /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() |