SHA256
1
0
forked from pool/lugaru
lugaru/0001-CMake-Define-build-type-before-configuring-version-h.patch
Adam Mizerski f3e8ec80d9 Accepting request 498464 from home:Pharaoh_Atem:branches:games
- Update to official 1.2 release
- Backport patches from upstream v1.2 branch
  * Added 0001-CMake-Define-build-type-before-configuring-version-h.patch
  * Added 0002-ImageIO-fix-invalid-conversion.patch
  * Added 0003-Dist-Linux-Add-content-ratings-to-AppStream-appdata-.patch
- Reflow the description to look less awkward
- Remove empty and unnecessary conditional for openSUSE < 42.1

OBS-URL: https://build.opensuse.org/request/show/498464
OBS-URL: https://build.opensuse.org/package/show/games/lugaru?expand=0&rev=19
2017-06-03 16:34:11 +00:00

84 lines
2.9 KiB
Diff

From 243cc8186ef01fd5d75d6fce6167b81201f2badb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= <rverschelde@gmail.com>
Date: Sat, 11 Feb 2017 20:34:07 +0100
Subject: [PATCH 1/2] CMake: Define build type before configuring version
header
Otherwise with no manual CMAKE_BUILD_TYPE, we end up with an
empty string.
(cherry picked from commit 6c2be7b3030442d0ffda2d712ef2159283de2f22)
---
CMakeLists.txt | 48 ++++++++++++++++++++++++------------------------
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3958eeb..fea3b1e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,6 +16,30 @@ if(UNIX AND NOT APPLE)
endif()
+### CMake config
+
+if(NOT CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE RelWithDebInfo)
+endif(NOT CMAKE_BUILD_TYPE)
+message(STATUS "CMake build type: ${CMAKE_BUILD_TYPE}")
+
+set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-parentheses -pedantic --std=gnu++11 ${CMAKE_CXX_FLAGS}")
+
+if(APPLE)
+ set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "Build architectures for OSX")
+ set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING
+ "Minimum OS X version to target for deployment (at runtime); newer APIs weak linked. Set to empty string for default value")
+ set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.11.sdk" CACHE PATH
+ "The product will be built against the headers and libraries located inside the indicated SDK.")
+endif(APPLE)
+
+if(LINUX)
+ option(SYSTEM_INSTALL "Enable system-wide installation, with hardcoded data directory defined with CMAKE_INSTALL_DATADIR" OFF)
+endif(LINUX)
+
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMake/Modules/")
+
+
### Version
# Version for the current (stable) or next (development) release
@@ -65,30 +89,6 @@ message(STATUS "Version string: ${LUGARU_VERSION_STRING}")
configure_file(${SRCDIR}/Version.hpp.in ${SRCDIR}/Version.hpp ESCAPE_QUOTES @ONLY)
-### CMake config
-
-if(NOT CMAKE_BUILD_TYPE)
- set(CMAKE_BUILD_TYPE RelWithDebInfo)
-endif(NOT CMAKE_BUILD_TYPE)
-message(STATUS "CMake build type: ${CMAKE_BUILD_TYPE}")
-
-set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-parentheses -pedantic --std=gnu++11 ${CMAKE_CXX_FLAGS}")
-
-if(APPLE)
- set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "Build architectures for OSX")
- set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING
- "Minimum OS X version to target for deployment (at runtime); newer APIs weak linked. Set to empty string for default value")
- set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.11.sdk" CACHE PATH
- "The product will be built against the headers and libraries located inside the indicated SDK.")
-endif(APPLE)
-
-if(LINUX)
- option(SYSTEM_INSTALL "Enable system-wide installation, with hardcoded data directory defined with CMAKE_INSTALL_DATADIR" OFF)
-endif(LINUX)
-
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMake/Modules/")
-
-
### Sources
set(LUGARU_SRCS
--
2.9.3