diff options
author | Michał Zieliński <michal@zielinscy.org.pl> | 2012-12-14 10:08:50 -0800 |
---|---|---|
committer | Michał Zieliński <michal@zielinscy.org.pl> | 2012-12-14 10:08:50 -0800 |
commit | 830fc19b8ce4ec6d5beeefd04bd085c35c1b664f (patch) | |
tree | 630b217fdd1a908991aa013a55a42aaf3ba84773 /CMakeLists.txt | |
parent | 2173e86025f03cc19af833f99c786391bd32718e (diff) | |
parent | e504fe1bb52137bdf34cd5ec9146913fb3d0c135 (diff) | |
download | colobot-830fc19b8ce4ec6d5beeefd04bd085c35c1b664f.tar.gz colobot-830fc19b8ce4ec6d5beeefd04bd085c35c1b664f.tar.bz2 colobot-830fc19b8ce4ec6d5beeefd04bd085c35c1b664f.zip |
Merge pull request #86 from OdyX/cmake_find_gtest
Use system-provided Google test library.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
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 |