summaryrefslogtreecommitdiff
path: root/vendor/googletest.cmake
blob: 5d475dd633bb93748f95ed93f8a2cae52015d8ec (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
if(TARGET mbgl-vendor-googletest)
    return()
endif()

add_library(
    mbgl-vendor-googletest STATIC EXCLUDE_FROM_ALL
    ${CMAKE_CURRENT_LIST_DIR}/googletest/googlemock/src/gmock-all.cc ${CMAKE_CURRENT_LIST_DIR}/googletest/googletest/src/gtest-all.cc
)

target_include_directories(
    mbgl-vendor-googletest
    PRIVATE
        ${CMAKE_CURRENT_LIST_DIR}/googletest/googletest
        ${CMAKE_CURRENT_LIST_DIR}/googletest/googletest/include
        ${CMAKE_CURRENT_LIST_DIR}/googletest/googlemock
        ${CMAKE_CURRENT_LIST_DIR}/googletest/googlemock/include
)

target_include_directories(
    mbgl-vendor-googletest SYSTEM
    INTERFACE ${CMAKE_CURRENT_LIST_DIR}/googletest/googletest/include ${CMAKE_CURRENT_LIST_DIR}/googletest/googlemock/include
)

set_property(TARGET mbgl-vendor-googletest PROPERTY FOLDER Core)