aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/meandmyshadow-define-paths-earlier.patch
blob: 505cbd23fe3301e51cccb295194cb01bb4ad65b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From: Tobias Geerinckx-Rice <me@tobias.gr>
Date: Wed, 31 Oct 2018 02:24:26 +0100
Subject: [PATCH] gnu: meandmyshadow: Define paths earlier.

The following patch was taken verbatim from the upstream repository[0]
and will be included in the next release.

[0]: https://github.com/acmepjz/meandmyshadow/pull/29
---
From 4847e6b5755258a1e0534f2d4b91dce2ce3b459e Mon Sep 17 00:00:00 2001
From: Dmitry Marakasov <amdmi3@amdmi3.ru>
Date: Wed, 24 Oct 2018 23:31:19 +0300
Subject: [PATCH] Define paths earlier in CMakeLists.txt

At the very least, paths should be defined before Configure_File(), otherwise empty DATAROOTDIR is substituted in config.h
---
 CMakeLists.txt | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e79639a..6321d9d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,6 +2,13 @@ Project (meandmyshadow)
 CMake_Minimum_Required (VERSION 3.1)
 Set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
 
+#Path options
+Set (BINDIR "bin" CACHE STRING "Where to install binaries")
+Set (DATAROOTDIR "${CMAKE_INSTALL_PREFIX}/share" CACHE STRING "Sets the root of data directories to a non-default location")
+Set (ICONDIR "${DATAROOTDIR}/icons" CACHE STRING "Sets the icon directory for desktop entry to a non-default location.")
+Set (DESKTOPDIR "${DATAROOTDIR}/applications" CACHE STRING "Sets the desktop file directory for desktop entry to a non-default location.")
+
+#Options
 Option (DEBUG_MODE "Compile the game with debug mode enabled" OFF)
 Option (DISABLED_DEBUG_STUFF "Enable this you'll see a lot of annoying script debug messages which will lag the game." OFF)
 
@@ -164,12 +171,6 @@ Target_Link_Libraries (
 	${LUA_LIBRARIES}
 )
 
-#Path options
-Set (BINDIR "bin" CACHE STRING "Where to install binaries")
-Set (DATAROOTDIR "${CMAKE_INSTALL_PREFIX}/share" CACHE STRING "Sets the root of data directories to a non-default location")
-Set (ICONDIR "${DATAROOTDIR}/icons" CACHE STRING "Sets the icon directory for desktop entry to a non-default location.")
-Set (DESKTOPDIR "${DATAROOTDIR}/applications" CACHE STRING "Sets the desktop file directory for desktop entry to a non-default location.")
-
 #Install locations
 Install (DIRECTORY ${PROJECT_SOURCE_DIR}/data DESTINATION ${DATAROOTDIR}/meandmyshadow/)
 Install (FILES AUTHORS DESTINATION ${DATAROOTDIR}/meandmyshadow/)