[megaglest] 103/143: Fix building with -DCMAKE_BUILD_TYPE=None (Closes: #739068)

Markus Koschany apo-guest at moszumanska.debian.org
Sat Jan 31 20:46:16 UTC 2015


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

apo-guest pushed a commit to branch master
in repository megaglest.

commit 0d236618134d5d0416bcbdabc0646af2a31de57a
Author: Paul Wise <pabs at debian.org>
Date:   Wed Mar 26 02:48:03 2014 +0000

    Fix building with -DCMAKE_BUILD_TYPE=None (Closes: #739068)
---
 debian/changelog                               |  1 +
 debian/patches/fix-cmake-build-type-none.patch | 64 ++++++++++++++++++++++++++
 debian/patches/series                          |  1 +
 3 files changed, 66 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 267b1fa..a329215 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,7 @@ megaglest (3.9.1-1) unstable; urgency=low
 
   [ Paul Wise ]
   * Bump Standards-Version, no changes needed
+  * Fix building with -DCMAKE_BUILD_TYPE=None (Closes: #739068)
 
  -- Mark Vejvoda <mark_vejvoda at hotmail.com>  Wed, 15 Jan 2014 21:01:59 +0800
 
diff --git a/debian/patches/fix-cmake-build-type-none.patch b/debian/patches/fix-cmake-build-type-none.patch
new file mode 100644
index 0000000..dd3b4e5
--- /dev/null
+++ b/debian/patches/fix-cmake-build-type-none.patch
@@ -0,0 +1,64 @@
+From dce61e29ba5f97bbe4c319cec7c6fd370c660971 Mon Sep 17 00:00:00 2001
+From: Paul Wise <pabs3 at bonedaddy.net>
+Date: Wed, 26 Mar 2014 10:26:53 +0800
+Subject: [PATCH] Also support -DCMAKE_BUILD_TYPE=None which is used by Debian
+
+---
+ CMakeLists.txt                   | 9 ++++++++-
+ source/glest_game/CMakeLists.txt | 1 +
+ 2 files changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 48e4bea..77b67e4 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -188,6 +188,9 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
+                 message(STATUS "**WARNING DID NOT Find GCC backtrace lib")
+         ENDIF()
+ 
++	# Default compiler flags
++	SET(CMAKE_CXX_FLAGS_NONE "${CMAKE_CXX_FLAGS_NONE}")
++
+ 	# Debug compiler flags
+ 	SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g3")
+ 
+@@ -280,6 +283,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
+ 		MESSAGE(STATUS "*NOTE: Custom Data Install Path is [${CUSTOM_DATA_INSTALL_PATH}]")
+ 	ENDIF()
+ 
++	SET(CMAKE_CXX_FLAGS_NONE "${CMAKE_CXX_FLAGS_NONE} ${GIT_VERSION_CMD} ${CUSTOM_DATA_INSTALL_PATH_VALUE}")
+ 	SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${GIT_VERSION_CMD} ${CUSTOM_DATA_INSTALL_PATH_VALUE}")
+ 	SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${GIT_VERSION_CMD} ${CUSTOM_DATA_INSTALL_PATH_VALUE}")
+ 	SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${GIT_VERSION_CMD} ${CUSTOM_DATA_INSTALL_PATH_VALUE}")
+@@ -287,12 +291,15 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
+ 
+ 	# We do some funky character escaping to get the right stuff written out to 
+ 	# the final Makefile so we get the GIT Global Revsion #
++	string(REPLACE "'" "\"" CMAKE_CXX_FLAGS_NONE "${CMAKE_CXX_FLAGS_NONE}")
+ 	string(REPLACE "'" "\"" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
+ 	string(REPLACE "'" "\"" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
+ 	string(REPLACE "'" "\"" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
+ 	string(REPLACE "'" "\"" CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL}")
+ 
+-	IF( CMAKE_BUILD_TYPE STREQUAL Debug )
++	IF( CMAKE_BUILD_TYPE STREQUAL None )
++		message("CMAKE_CXX_FLAGS_NONE: ${CMAKE_CXX_FLAGS_NONE}")
++	ELSEIF( CMAKE_BUILD_TYPE STREQUAL Debug )
+ 		message("CMAKE_CXX_FLAGS_DEBUG: ${CMAKE_CXX_FLAGS_DEBUG}")
+ 	ELSEIF( CMAKE_BUILD_TYPE STREQUAL Release )
+ 		message("CMAKE_CXX_FLAGS_RELEASE: ${CMAKE_CXX_FLAGS_RELEASE}")
+diff --git a/source/glest_game/CMakeLists.txt b/source/glest_game/CMakeLists.txt
+index 1c94df6..eabc866 100644
+--- a/source/glest_game/CMakeLists.txt
++++ b/source/glest_game/CMakeLists.txt
+@@ -208,6 +208,7 @@ IF(BUILD_MEGAGLEST)
+ 	ENDIF()
+ 
+ 	IF(WIN32)
++		SET(CMAKE_CXX_FLAGS_NONE "${CMAKE_CXX_FLAGS_NONE} -Wl,-subsystem,console -mconsole")
+ 		SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wl,-subsystem,console -mconsole")
+ 		SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wl,-subsystem,console -mconsole")
+ 		SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -Wl,-subsystem,console -mconsole")
+-- 
+1.9.0
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..b00dbc0
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+fix-cmake-build-type-none.patch

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



More information about the Pkg-games-commits mailing list