summaryrefslogtreecommitdiff
blob: 2db85af2a25b0654937dc5f20c7a366be419959a (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
diff -Naur a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt	2016-01-10 13:40:55.000000000 +0000
+++ b/CMakeLists.txt	2018-08-27 21:05:53.852400460 +0100
@@ -20,7 +20,8 @@
 #####################################################################
 # Installation directories
 #####################################################################
-set(mars_DATA_DEST_DIR ${CMAKE_INSTALL_PREFIX}/share/games/marsshooter CACHE STRING "marsshooter data files destdir")
+include(GNUInstallDirs)
+set(mars_DATA_DEST_DIR ${CMAKE_INSTALL_FULL_DATAROOTDIR}/games/marsshooter CACHE STRING "marsshooter data files destdir")
 set(mars_EXE_DEST_DIR ${CMAKE_INSTALL_PREFIX}/games CACHE STRING "marsshooter exe destdir")
 
 #####################################################################
diff -Naur a/src/CMakeLists.txt b/src/CMakeLists.txt
--- a/src/CMakeLists.txt	2016-01-10 13:40:55.000000000 +0000
+++ b/src/CMakeLists.txt	2018-08-27 21:05:55.467442894 +0100
@@ -75,7 +75,7 @@
 			${MARS_SOURCE_DIR}/credits.txt
 			${MARS_SOURCE_DIR}/license.txt
 		DESTINATION
-			${CMAKE_INSTALL_PREFIX}/share/doc/marsshooter
+			${CMAKE_INSTALL_FULL_DOCDIR}
 	)
 	install(
 		FILES
@@ -101,40 +101,40 @@
 		FILES
 			${MARS_SOURCE_DIR}/resources/marsshooter.png
 		DESTINATION
-			${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/512x512/apps
+			${CMAKE_INSTALL_FULL_DATAROOTDIR}/icons/hicolor/512x512/apps
 	)
 	install(
 		FILES
 			${MARS_SOURCE_DIR}/resources/marsshooter.svg
 		DESTINATION
-			${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps
+			${CMAKE_INSTALL_FULL_DATAROOTDIR}/icons/hicolor/scalable/apps
 	)
 	install(
 		FILES
 			${MARS_SOURCE_DIR}/resources/marsshooter.xpm
 		DESTINATION
-			${CMAKE_INSTALL_PREFIX}/share/pixmaps
+			${CMAKE_INSTALL_FULL_DATAROOTDIR}/pixmaps
 	)
 	# desktop file
 	install(
 		FILES
 			${MARS_SOURCE_DIR}/resources/marsshooter.desktop
 		DESTINATION
-			${CMAKE_INSTALL_PREFIX}/share/applications
+			${CMAKE_INSTALL_FULL_DATAROOTDIR}/applications
 	)
 	# appdata file
 	install(
 		FILES
 			${MARS_SOURCE_DIR}/resources/marsshooter.appdata.xml
 		DESTINATION
-			${CMAKE_INSTALL_PREFIX}/share/appdata
+			${CMAKE_INSTALL_FULL_DATAROOTDIR}/appdata
 	)
 	# manpage
 	install(
 		FILES
 			${MARS_SOURCE_DIR}/resources/marsshooter.6
 		DESTINATION
-			${CMAKE_INSTALL_PREFIX}/share/man/man6
+			${CMAKE_INSTALL_FULL_MANDIR}/man6
 	)
     #install(
     #FILES