summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2012-12-16 17:20:34 +0100
committerPiotr Dziwinski <piotrdz@gmail.com>2012-12-16 17:20:34 +0100
commit86c356a6f559a9728a0e03cdec89a87aa6b67644 (patch)
treec5e22dff3a7e38b817c299c287fe6c12340ad906 /CMakeLists.txt
parent56a170391f944f7a042b81fe7e6817a0c28fb005 (diff)
downloadcolobot-86c356a6f559a9728a0e03cdec89a87aa6b67644.tar.gz
colobot-86c356a6f559a9728a0e03cdec89a87aa6b67644.tar.bz2
colobot-86c356a6f559a9728a0e03cdec89a87aa6b67644.zip
GMock: fixed using system package
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d6cf8a2..d072fd0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -146,13 +146,17 @@ if(${TESTS})
find_path(GMOCK_INCLUDE_DIR gmock/gmock.h PATHS /usr/include)
if(GMOCK_SRC_DIR AND GMOCK_INCLUDE_DIR)
message(STATUS "Using system gmock library in ${GMOCK_SRC_DIR}")
+
+ include_directories(${GMOCK_SRC_DIR})
+ # gmock-all.cc includes all other sources
+ add_library(gmock STATIC ${GMOCK_SRC_DIR}/src/gmock-all.cc)
else()
message(STATUS "Using bundled gmock library")
set(GMOCK_SRC_DIR ${colobot_SOURCE_DIR}/lib/gmock)
set(GMOCK_INCLUDE_DIR ${colobot_SOURCE_DIR}/lib/gmock/include)
+ add_subdirectory(${GMOCK_SRC_DIR} bin/gmock)
endif()
- add_subdirectory(${GMOCK_SRC_DIR} bin/gmock)
endif()
# Subdirectory with sources