summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 660c79f..6e9e969 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -125,8 +125,12 @@ endif()
if(${TESTS})
# Google Test library
- set(GTEST_DIR "${colobot_SOURCE_DIR}/lib/gtest")
- add_subdirectory(lib/gtest bin/test)
+ find_path(GTEST_SRC_DIR src/gtest.cc PATHS /usr/src/ PATH_SUFFIXES gtest)
+ if(GTEST_SRC_DIR)
+ add_subdirectory(${GTEST_SRC_DIR} bin/test)
+ else(GTEST_SRC_DIR)
+ add_subdirectory(lib/gtest bin/test)
+ endif(GTEST_SRC_DIR)
endif()
# Subdirectory with sources