aboutsummaryrefslogtreecommitdiff
path: root/tests/CMakeLists.txt
diff options
context:
space:
mode:
authorRodney Dawes <rodney.dawes@canonical.com>2017-02-07 16:28:37 -0500
committerRodney Dawes <rodney.dawes@canonical.com>2017-02-07 16:28:37 -0500
commit3e00c2f1483561613850820a674270c5d5154572 (patch)
tree2343c36e1b987ad2039fa90d84d8dc4be887e1ad /tests/CMakeLists.txt
parentb61052da17119b8607a4bcb9c8a7559e092873ee (diff)
downloadayatana-indicator-sound-3e00c2f1483561613850820a674270c5d5154572.tar.gz
ayatana-indicator-sound-3e00c2f1483561613850820a674270c5d5154572.tar.bz2
ayatana-indicator-sound-3e00c2f1483561613850820a674270c5d5154572.zip
Use only the gmock module from cmake-extras.
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r--tests/CMakeLists.txt29
1 files changed, 10 insertions, 19 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index e69c01e..610ed9b 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,14 +1,5 @@
-
-###########################
-# Google Test
-###########################
-
-include_directories(${GTEST_INCLUDE_DIR})
-
-add_library (gtest-static STATIC
- ${GTEST_SOURCE_DIR}/gtest-all.cc
- ${GTEST_SOURCE_DIR}/gtest_main.cc)
-target_link_libraries(gtest-static ${GTEST_LIBS})
+find_package(GMock)
+include_directories(${GMOCK_INCLUDE_DIRS})
###########################
# GSettings Schema
@@ -141,7 +132,7 @@ target_link_libraries (pulse-mock ${PULSEAUDIO_LIBRARIES})
include_directories(${CMAKE_SOURCE_DIR}/src)
add_executable (name-watch-test name-watch-test.cc ${CMAKE_SOURCE_DIR}/src/bus-watch-namespace.c)
-target_link_libraries (name-watch-test gtest-static ${SOUNDSERVICE_LIBRARIES})
+target_link_libraries (name-watch-test ${SOUNDSERVICE_LIBRARIES} ${GMOCK_LIBRARIES})
add_test(name-watch-test name-watch-test)
###########################
@@ -154,9 +145,9 @@ target_link_libraries (
accounts-service-user-test
indicator-sound-service-lib
vala-mocks-lib
- gtest-static
${SOUNDSERVICE_LIBRARIES}
${TEST_LIBRARIES}
+ ${GMOCK_LIBRARIES}
)
# Split tests to work around libaccountservice sucking
@@ -179,8 +170,8 @@ target_link_libraries (
indicator-sound-service-lib
vala-mocks-lib
pulse-mock
- gtest-static
${TEST_LIBRARIES}
+ ${GMOCK_LIBRARIES}
)
add_test(volume-control-test volume-control-test)
@@ -195,9 +186,9 @@ target_link_libraries (
sound-menu-test
indicator-sound-service-lib
vala-mocks-lib
- gtest-static
${SOUNDSERVICE_LIBRARIES}
${TEST_LIBRARIES}
+ ${GMOCK_LIBRARIES}
)
add_test(sound-menu-test sound-menu-test)
@@ -213,9 +204,9 @@ target_link_libraries (
indicator-sound-service-lib
vala-mocks-lib
pulse-mock
- gtest-static
${SOUNDSERVICE_LIBRARIES}
${TEST_LIBRARIES}
+ ${GMOCK_LIBRARIES}
)
add_test(notifications-test notifications-test)
@@ -230,9 +221,9 @@ target_link_libraries (
media-player-user-test
indicator-sound-service-lib
vala-mocks-lib
- gtest-static
${SOUNDSERVICE_LIBRARIES}
${TEST_LIBRARIES}
+ ${GMOCK_LIBRARIES}
)
# Split tests to work around libaccountservice sucking
@@ -256,9 +247,9 @@ target_link_libraries (
greeter-list-test
indicator-sound-service-lib
vala-mocks-lib
- gtest-static
${SOUNDSERVICE_LIBRARIES}
${TEST_LIBRARIES}
+ ${GMOCK_LIBRARIES}
)
# Split tests to work around libaccountservice sucking
@@ -280,9 +271,9 @@ add_definitions(
add_executable (indicator-test indicator-test.cc gschemas.compiled)
target_link_libraries (
indicator-test
- gtest-static
${SOUNDSERVICE_LIBRARIES}
${TEST_LIBRARIES}
+ ${GMOCK_LIBRARIES}
)
# Split tests to work around libaccountservice sucking