aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-04-20 15:49:07 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-04-21 20:57:03 +0200
commitdb3414f69c4148ac5c2cfc231cbe55a7dddfb7b3 (patch)
tree177574dfcc414adc4855b5c078516fc282a49243 /tests
parent42a5485d18b7a2ff07c1f59957a4246e7334a4d4 (diff)
downloadayatana-ido-db3414f69c4148ac5c2cfc231cbe55a7dddfb7b3.tar.gz
ayatana-ido-db3414f69c4148ac5c2cfc231cbe55a7dddfb7b3.tar.bz2
ayatana-ido-db3414f69c4148ac5c2cfc231cbe55a7dddfb7b3.zip
tests/: Port to using GMock cmake package from cmake-extras.
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt20
1 files changed, 17 insertions, 3 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 69bc291..f8781fd 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,11 +1,25 @@
+find_package(GMock)
+
# gtest-menuitems
+include_directories(
+ ${CMAKE_SOURCE_DIR}/src
+ ${PROJECT_DEPS_INCLUDE_DIRS}
+)
+
set_source_files_properties(gtest-menuitems.cpp PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS})
+
add_executable("gtest-menuitems" gtest-menuitems.cpp)
-target_include_directories("gtest-menuitems" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS})
-target_include_directories("gtest-menuitems" PUBLIC "${CMAKE_SOURCE_DIR}/src")
+target_link_libraries("gtest-menuitems"
+ ayatana-ido3-0.4
+
+ ${PROJECT_DEPS_LIBRARIES}
+
+ ${GTEST_LIBRARIES}
+ ${GTEST_BOTH_LIBRARIES}
+ ${GMOCK_LIBRARIES}
+)
add_test("gtest-menuitems" "gtest-menuitems")
-target_link_libraries("gtest-menuitems" ${PROJECT_DEPS_LIBRARIES} "-L${CMAKE_BINARY_DIR}/src" -layatana-ido3-0.4 gtest_main)
# coverage