summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Cowgill <jcowgill@debian.org>2019-07-30 21:38:18 +0100
committerJames Cowgill <jcowgill@debian.org>2019-07-30 21:38:18 +0100
commit4a9d7f979e68cf90c384bb37e2b006c1d8c05a62 (patch)
treed08eed95a32fa98d5c9a71d608a043a49f51a9fb
parent66a3028aa86e550364edd2021a8a777deb0d4911 (diff)
Debian only ships the source of gtest rather than a library.
Forwarded: not-needed Add GTEST_DIR to specify the location of the gtest SOURCE to be built along with dolphin. Forwarded: not-needed Gbp-Pq: Name 01_shared-gtest.patch
-rw-r--r--CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5df4b2e..40db251 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,6 +8,7 @@ option(USE_EGL "Enables EGL OpenGL Interface" OFF)
option(TRY_X11 "Enables X11 Support" ON)
option(USE_SHARED_ENET "Use shared libenet if found rather than Dolphin's soon-to-compatibly-diverge version" OFF)
option(USE_SHARED_GTEST "Use shared gtest library if found" OFF)
+set(GTEST_DIR "" CACHE STRING "Optional path to a gtest source")
option(USE_UPNP "Enables UPnP port mapping support" ON)
option(DISABLE_WX "Disable wxWidgets (use Qt or CLI interface)" OFF)
option(ENABLE_QT2 "Enable Qt2 (use the other experimental Qt interface)" OFF)
@@ -948,7 +949,11 @@ include_directories("${PROJECT_BINARY_DIR}/Source/Core/Common")
# Unit testing.
#
include(FindGTest)
-if(GTEST_FOUND AND USE_SHARED_GTEST)
+if(NOT ("${GTEST_DIR}" STREQUAL ""))
+ message("Using shared gtest in ${GTEST_DIR}")
+ include_directories(${GTEST_DIR} ${GTEST_DIR}/include)
+ add_library(gtest EXCLUDE_FROM_ALL ${GTEST_DIR}/src/gtest-all.cc ${GTEST_DIR}/src/gtest_main.cc)
+elseif(GTEST_FOUND AND USE_SHARED_GTEST)
message("Using shared gtest")
include_directories(${GTEST_INCLUDE_DIRS})
else()