summaryrefslogtreecommitdiffstats
path: root/src/jaegertracing/opentelemetry-cpp/third_party/prometheus-cpp/cmake/googlemock-3rdparty-config.cmake
blob: 66defd2f6912399ce0a19ef8f9487a6b69c1d052 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_DIR}/../3rdparty/googletest/" ABSOLUTE)

find_package(Threads QUIET)

add_library(gmock_main STATIC EXCLUDE_FROM_ALL
  ${_IMPORT_PREFIX}/googletest/src/gtest-all.cc
  ${_IMPORT_PREFIX}/googlemock/src/gmock-all.cc
  ${_IMPORT_PREFIX}/googlemock/src/gmock_main.cc
)

target_include_directories(gmock_main SYSTEM
  PUBLIC
    ${_IMPORT_PREFIX}/googletest/include
    ${_IMPORT_PREFIX}/googlemock/include
  PRIVATE
    ${_IMPORT_PREFIX}/googletest
    ${_IMPORT_PREFIX}/googlemock
)

target_link_libraries(gmock_main
  PRIVATE
    Threads::Threads
)
add_library(GTest::gmock_main ALIAS gmock_main)

set_target_properties(gmock_main PROPERTIES
  C_INCLUDE_WHAT_YOU_USE ""
  CXX_INCLUDE_WHAT_YOU_USE ""
)