aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9588e19..81950d5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -97,7 +97,13 @@ include_directories (${CMAKE_CURRENT_BINARY_DIR}/include)
# testing & coverage
if (${enable_tests})
pkg_check_modules (DBUSTEST REQUIRED dbustest-1>=14.04.0)
- set (GTEST_SOURCE_DIR /usr/src/gtest/src)
+
+ if (EXISTS /usr/src/googletest/src)
+ set (GTEST_SOURCE_DIR /usr/src/googletest/src)
+ else ()
+ set (GTEST_SOURCE_DIR /usr/src/gtest/src)
+ endif ()
+
set (GTEST_INCLUDE_DIR ${GTEST_SOURCE_DIR}/..)
set (GTEST_LIBS -lpthread)
enable_testing ()