-
Notifications
You must be signed in to change notification settings - Fork 71
/
CMakeLists.txt
executable file
·244 lines (220 loc) · 8.72 KB
/
CMakeLists.txt
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
cmake_minimum_required(VERSION 3.6)
project(autobleem-gui)
set(CMAKE_CXX_STANDARD 11)
#set(CMAKE_VERBOSE_MAKEFILE ON)
message(STATUS "CMAKE_SYSTEM_PROCESSOR=${CMAKE_SYSTEM_PROCESSOR}")
if (CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" )
message(STATUS "Building for ARM")
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0)
message(STATUS "CXX Compiler Version > 8")
SET(CMAKE_C_FLAGS "-mfloat-abi=hard -march=armv8-a+simd -Os -s")
SET(CMAKE_CXX_FLAGS " -mfloat-abi=hard -march=armv8-a+simd -Os -s")
message(STATUS "Newer GCC installed")
else()
message(STATUS "CXX Compiler Version <= 8")
SET(CMAKE_C_FLAGS "-mfloat-abi=hard -march=armv7ve -s -Os -O3")
SET(CMAKE_CXX_FLAGS "-mfloat-abi=hard -march=armv7ve -s -Os -O3")
endif()
include_directories(src/include "/opt/toolchain/armv8-sony-linux-gnueabihf/sysroot/usr/include")
link_directories(/opt/toolchain/armv8-sony-linux-gnueabihf/sysroot/usr/lib)
else()
message(STATUS "Building for PC CPU type=${CMAKE_BUILD_TYPE}")
if( "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" )
# if (MEM_DEBUG) # -DMEM_DEBUG=Extra in Clion does not work! cmake doesn't see it
# message(STATUS "Enabling all warnings")
# # all compiler warnings
# SET(CMAKE_C_FLAGS "-Wall -W")
# SET(CMAKE_CXX_FLAGS "-Wall -W")
message(STATUS "Enabling some warnings")
# some compiler warnings
SET(CMAKE_C_FLAGS "-Wreturn-type -Wuninitialized")
SET(CMAKE_CXX_FLAGS "-Wreturn-type -Wuninitialized")
# message(STATUS "Enabling additional memory debugging")
# memory sanitizer with all compiler warnings
# SET(CMAKE_C_FLAGS "-fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined -ggdb -Wall -W")
# SET(CMAKE_CXX_FLAGS "-fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined -ggdb -Wall -W")
# memory sanitizer with compiler warning for not returning a value from a function and uninitialized vars
# SET(CMAKE_C_FLAGS "-fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined -ggdb -Wreturn-type -Wuninitialized")
# SET(CMAKE_CXX_FLAGS "-fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined -ggdb -Wreturn-type -Wuninitialized")
# memory sanitizer with no additonal compiler warnings
# SET(CMAKE_C_FLAGS "-fsanitize=address -fno-omit-frame-pointer")
# SET(CMAKE_CXX_FLAGS "-fsanitize=address -fno-omit-frame-pointer")
# SET(LDFLAGS "-fsanitize=address -fno-omit-frame-pointer")
# endif()
else()
message(STATUS "Building Release")
endif()
endif()
find_package(Threads REQUIRED
SDL2 REQUIRED)
add_library(sqlite3 STATIC libs/sqlite/sqlite3ab.c )
add_executable(
autobleem-gui
src/code/DebugTimer.cpp
src/code/DebugTimer.h
src/code/DirEntry.cpp
src/code/DirEntry.h
src/code/engine/cardedit.cpp
src/code/engine/cardedit.h
src/code/engine/cfgprocessor.cpp
src/code/engine/cfgprocessor.h
src/code/engine/config.cpp
src/code/engine/config.h
src/code/engine/coverdb.cpp
src/code/engine/coverdb.h
src/code/engine/database.cpp
src/code/engine/database.h
src/code/engine/ecmhelper.cpp
src/code/engine/ecmhelper.h
src/code/engine/game.cpp
src/code/engine/game.h
src/code/engine/GetGameDirHierarchy.cpp
src/code/engine/GetGameDirHierarchy.h
src/code/engine/inifile.cpp
src/code/engine/inifile.h
src/code/engine/isodir.cpp
src/code/engine/isodir.h
src/code/engine/memcard.cpp
src/code/engine/memcard.h
src/code/engine/metadata.cpp
src/code/engine/metadata.h
src/code/engine/padmapper.cpp
src/code/engine/padmapper.h
src/code/engine/scanner.cpp
src/code/engine/scanner.h
src/code/engine/serialscanner.cpp
src/code/engine/serialscanner.h
src/code/environment.cpp
src/code/environment.h
src/code/gui/gui.cpp
src/code/gui/gui.h
src/code/gui/gui_about.cpp
src/code/gui/gui_about.h
src/code/gui/gui_confirm.cpp
src/code/gui/gui_confirm.h
src/code/gui/gui_font.cpp
src/code/gui/gui_font.h
src/code/gui/gui_font_wrapper.h
src/code/gui/gui_keyboard.cpp
src/code/gui/gui_keyboard.h
src/code/gui/gui_padconfig.cpp
src/code/gui/gui_padconfig.h
src/code/gui/gui_padTest.cpp
src/code/gui/gui_padTest.h
src/code/gui/gui_screen.cpp
src/code/gui/gui_screen.h
src/code/gui/gui_scrollWin.cpp
src/code/gui/gui_scrollWin.h
src/code/gui/gui_sdl_wrapper.cpp
src/code/gui/gui_sdl_wrapper.h
src/code/gui/gui_selectmemcard.cpp
src/code/gui/gui_selectmemcard.h
src/code/gui/gui_splash.cpp
src/code/gui/gui_splash.h
src/code/gui/menus/gui_gameDirMenu.h
src/code/gui/menus/gui_gameEditorMenu.cpp
src/code/gui/menus/gui_gameEditorMenu.h
src/code/gui/menus/gui_gameManagerMenu.cpp
src/code/gui/menus/gui_gameManagerMenu.h
src/code/gui/menus/gui_memCardsMenu.cpp
src/code/gui/menus/gui_memCardsMenu.h
src/code/gui/menus/gui_menuBase.h
src/code/gui/menus/gui_networkMenu.cpp
src/code/gui/menus/gui_networkMenu.h
src/code/gui/menus/gui_optionsMenu.cpp
src/code/gui/menus/gui_optionsMenu.h
src/code/gui/menus/gui_optionsMenuBase.cpp
src/code/gui/menus/gui_optionsMenuBase.h
src/code/gui/menus/gui_playlistsMenu.h
src/code/gui/menus/gui_stringMenu.h
src/code/gui/menus/gui_twoColumnStringMenu.h
src/code/gui/starfx.cpp
src/code/gui/starfx.h
src/code/lang.cpp
src/code/lang.h
src/code/launcher/emu_interceptor.cpp
src/code/launcher/emu_interceptor.h
src/code/launcher/gui_app_start.cpp
src/code/launcher/gui_app_start.h
src/code/launcher/gui_btn_guide.cpp
src/code/launcher/gui_btn_guide.h
src/code/launcher/gui_launcher.cpp
src/code/launcher/gui_launcher.h
src/code/launcher/gui_launcher_loop.cpp
src/code/launcher/gui_mc_manager.cpp
src/code/launcher/gui_mc_manager.h
src/code/launcher/gui_NotificationLine.cpp
src/code/launcher/gui_NotificationLine.h
src/code/launcher/launch_interceptor.cpp
src/code/launcher/launch_interceptor.h
src/code/launcher/pcsx_interceptor.cpp
src/code/launcher/pcsx_interceptor.h
src/code/launcher/ps_carousel.cpp
src/code/launcher/ps_carousel.h
src/code/launcher/ps_centerlabel.cpp
src/code/launcher/ps_centerlabel.h
src/code/launcher/ps_game.cpp
src/code/launcher/ps_game.h
src/code/launcher/ps_menu.cpp
src/code/launcher/ps_menu.h
src/code/launcher/ps_meta.cpp
src/code/launcher/ps_meta.h
src/code/launcher/ps_move_bnt.cpp
src/code/launcher/ps_move_bnt.h
src/code/launcher/ps_obj.cpp
src/code/launcher/ps_obj.h
src/code/launcher/ps_settings_back.cpp
src/code/launcher/ps_settings_back.h
src/code/launcher/ps_stateselector.cpp
src/code/launcher/ps_stateselector.h
src/code/launcher/ps_static.cpp
src/code/launcher/ps_static.h
src/code/launcher/ps_zoom_btn.cpp
src/code/launcher/ps_zoom_btn.h
src/code/launcher/ra_integrator.cpp
src/code/launcher/ra_integrator.h
src/code/launcher/retboot_interceptor.cpp
src/code/launcher/retboot_interceptor.h
src/code/main.cpp
src/code/main.h
src/code/unecm.c
src/code/util.cpp
src/code/util.h
src/code/ver_migration.cpp
src/code/ver_migration.h
)
target_include_directories(autobleem-gui PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/libs/sqlite>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/libs/nlohmann>
)
add_executable(starter
src/code/starter.cpp
src/code/util.h
src/code/util.cpp
src/code/DirEntry.h
src/code/DirEntry.cpp
src/code/engine/inifile.cpp
src/code/engine/memcard.cpp src/code/engine/memcard.h
src/code/environment.h
src/code/environment.cpp
)
target_link_libraries(autobleem-gui
Threads::Threads
SDL2
SDL2_image
SDL2_mixer
SDL2_ttf
sqlite3
${CMAKE_DL_LIBS}
)
#add_custom_command(TARGET autobleem-gui PRE_BUILD
# WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
# VERBATIM
# COMMAND /bin/bash make_english.txt.sh
# )
add_custom_command(TARGET autobleem-gui PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_SOURCE_DIR}/src/resources $<TARGET_FILE_DIR:autobleem-gui>)
configure_file(src/resources/default.lic default.lic COPYONLY)
configure_file(src/resources/default.png default.png COPYONLY)
configure_file(src/resources/pcsx.cfg pcsx.cfg COPYONLY)