From 5ffd6963a1187de5f753cad768658983538c0fbf Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Tue, 4 May 2021 18:24:50 +0200 Subject: CMakeLists.txt: Fix GTest path --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 () -- cgit v1.2.3