[dolphin-emu] 13/16: Add patch to build with shared gtest

James Cowgill jcowgill-guest at moszumanska.debian.org
Thu Sep 10 21:31:29 UTC 2015


This is an automated email from the git hooks/post-receive script.

jcowgill-guest pushed a commit to branch experimental
in repository dolphin-emu.

commit 74704f3ba5f588ff78d25cfe69b7bb51028fd79e
Author: James Cowgill <james410 at cowgill.org.uk>
Date:   Tue Sep 8 22:04:52 2015 +0100

    Add patch to build with shared gtest
---
 debian/patches/01_shared-gtest.patch | 33 +++++++++++++++++++++++++++++++++
 debian/patches/series                |  1 +
 2 files changed, 34 insertions(+)

diff --git a/debian/patches/01_shared-gtest.patch b/debian/patches/01_shared-gtest.patch
new file mode 100644
index 0000000..5038660
--- /dev/null
+++ b/debian/patches/01_shared-gtest.patch
@@ -0,0 +1,33 @@
+Description: Allow dolphin to build against a shared copy of gtest
+Author: James Cowgill <james410 at cowgill.org.uk>
+Forwarded: no
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -13,6 +13,7 @@ option(ENABLE_QT "Enable Qt (use the exp
+ option(ENABLE_PCH "Use PCH to speed up compilation" ON)
+ option(ENABLE_LTO "Enables Link Time Optimization" OFF)
+ option(ENABLE_GENERIC "Enables generic build that should run on any little-endian host" OFF)
++set(GTEST_DIR "" CACHE STRING "Optional path to a shared copy gtest")
+ 
+ # Enable SDL for default on operating systems that aren't OSX, Android, Linux or Windows.
+ if(NOT APPLE AND NOT ANDROID AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND NOT MSVC)
+@@ -856,8 +857,15 @@ include_directories("${PROJECT_BINARY_DI
+ ########################################
+ # Unit testing.
+ #
+-include_directories(Externals/gtest/include)
+-add_subdirectory(Externals/gtest)
++if ("${GTEST_DIR}" STREQUAL "")
++	message("Using gtest from Externals")
++	include_directories(Externals/gtest/include)
++	add_subdirectory(Externals/gtest)
++else()
++	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)
++endif()
+ 
+ enable_testing()
+ add_custom_target(unittests)
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..6d2d99d
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+01_shared-gtest.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/dolphin-emu.git



More information about the Pkg-games-commits mailing list