blob: 01c84ff008ac4991990e70d0f38eca0f5617d6c6 (
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
73
74
75
76
77
78
79
|
From: Julian Ospald <hasufell@gentoo.org>
Date: Wed Dec 25 22:55:09 UTC 2013
Subject: respect flags, fix installation
--- dustrac-1.6.2/CMakeLists.txt
+++ dustrac-1.6.2/CMakeLists.txt
@@ -43,7 +43,7 @@
include("InstallWindows.cmake")
endif()
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -W -Wall -O3 -pedantic")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -W -Wall")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -ffast-math")
set(GAME_BINARY_NAME "dustrac-game")
--- dustrac-1.6.2/src/game/CMakeLists.txt
+++ dustrac-1.6.2/src/game/CMakeLists.txt
@@ -128,16 +128,11 @@
# Copy desktop file
if(ReleaseBuild AND UNIX)
- set(DesktopFileSourcePath)
if(USC)
- set(DesktopFileSourcePath ${CMAKE_SOURCE_DIR}/src/dustrac-game.desktop.opt.in)
+ configure_file(${CMAKE_SOURCE_DIR}/src/dustrac-game.desktop.opt.in ${CMAKE_BINARY_DIR}/src/dustrac-game.desktop)
else()
- set(DesktopFileSourcePath ${CMAKE_SOURCE_DIR}/src/dustrac-game.desktop.in)
+ configure_file(${CMAKE_SOURCE_DIR}/src/dustrac-game.desktop.in ${CMAKE_BINARY_DIR}/src/dustrac-game.desktop)
endif()
- add_custom_target(desktop-file-game ALL
- COMMAND cmake -E copy ${DesktopFileSourcePath}
- ${CMAKE_BINARY_DIR}/dustrac-game.desktop
- DEPENDS ${GAME_BINARY_NAME})
endif()
# Resource compilation for MinGW
--- dustrac-1.6.2/src/editor/CMakeLists.txt
+++ dustrac-1.6.2/src/editor/CMakeLists.txt
@@ -76,16 +76,11 @@
# Copy desktop file
if(ReleaseBuild AND UNIX)
- set(DesktopFileSourcePath)
if(USC)
- set(DesktopFileSourcePath ${CMAKE_SOURCE_DIR}/src/dustrac-editor.desktop.opt.in)
+ configure_file(${CMAKE_SOURCE_DIR}/src/dustrac-editor.desktop.opt.in ${CMAKE_BINARY_DIR}/src/dustrac-editor.desktop)
else()
- set(DesktopFileSourcePath ${CMAKE_SOURCE_DIR}/src/dustrac-editor.desktop.in)
+ configure_file(${CMAKE_SOURCE_DIR}/src/dustrac-editor.desktop.in ${CMAKE_BINARY_DIR}/src/dustrac-editor.desktop)
endif()
- add_custom_target(desktop-file-editor ALL
- COMMAND cmake -E copy ${DesktopFileSourcePath}
- ${CMAKE_BINARY_DIR}/dustrac-editor.desktop
- DEPENDS ${EDITOR_BINARY_NAME})
endif()
# Add the executable
--- dustrac-1.6.2/InstallLinux.cmake
+++ dustrac-1.6.2/InstallLinux.cmake
@@ -58,7 +58,7 @@
install(FILES data/fonts.conf DESTINATION ${DATA_PATH})
install(FILES data/meshes.conf DESTINATION ${DATA_PATH})
install(FILES data/textures.conf DESTINATION ${DATA_PATH})
- install(FILES AUTHORS CHANGELOG COPYING README DESTINATION ${DOC_PATH})
+ install(FILES AUTHORS CHANGELOG README DESTINATION ${DOC_PATH})
install(DIRECTORY data/images DESTINATION ${DATA_PATH} FILES_MATCHING PATTERN "*.jpg")
install(DIRECTORY data/images DESTINATION ${DATA_PATH} FILES_MATCHING PATTERN "*.png")
install(DIRECTORY data/levels DESTINATION ${DATA_PATH} FILES_MATCHING PATTERN "*.trk")
@@ -69,8 +69,8 @@
if(ReleaseBuild)
# Install .desktop files
- install(FILES dustrac-game.desktop DESTINATION share/applications)
- install(FILES dustrac-editor.desktop DESTINATION share/applications)
+ install(FILES ${CMAKE_BINARY_DIR}/src/dustrac-game.desktop DESTINATION share/applications)
+ install(FILES ${CMAKE_BINARY_DIR}/src/dustrac-editor.desktop DESTINATION share/applications)
# Install icons
install(FILES data/icons/dustrac-game.png DESTINATION share/pixmaps)
|