-
Notifications
You must be signed in to change notification settings - Fork 29
/
CMakeLists.txt
176 lines (165 loc) · 4.44 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
cmake_minimum_required(VERSION 2.8)
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
if(DEFINED ENV{VITASDK})
set(CMAKE_TOOLCHAIN_FILE "$ENV{VITASDK}/share/vita.toolchain.cmake" CACHE PATH "toolchain file")
else()
message(FATAL_ERROR "Please define VITASDK to point to your SDK path!")
endif()
endif()
project(YoYoLoader C CXX)
include("${VITASDK}/share/vita.cmake" REQUIRED)
set(VITA_APP_NAME "YoYo Loader")
set(VITA_TITLEID "YYOLOADER")
set(VITA_VERSION "01.00")
set(VITA_MKSFOEX_FLAGS "-d ATTRIBUTE2=12")
execute_process(COMMAND git describe --abbrev=6 --dirty --always
OUTPUT_VARIABLE GIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-optimize-sibling-calls -fdiagnostics-color=always -g -Wl,-q,--wrap,memcpy,--allow-multiple-definition,--wrap,memmove,--wrap,memset -Wno-format-overflow -D_GNU_SOURCE -Wall -O3 -mfloat-abi=softfp")
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-color=always -Wno-write-strings -DGIT_VERSION=\"${GIT_HASH}\" -std=c++11")
if (LOADER)
if (VIDEO_SUPPORT)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAS_VIDEO_PLAYBACK_SUPPORT")
endif(VIDEO_SUPPORT)
if (STANDALONE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DSTANDALONE_MODE")
endif(STANDALONE)
add_executable(YoYoLoader
loader/main.c
loader/dialog.c
loader/so_util.c
loader/sha1.c
loader/openal_patch.c
loader/gamepad.c
loader/ioapi.c
loader/unzip.c
loader/zip.c
loader/ctype_patch.c
loader/sbrk.c
loader/videoplayer_patch.c
loader/net.c
loader/profiler.c
loader/audio_player.c
loader/trophies.c
)
target_link_libraries(YoYoLoader
-Wl,--whole-archive pthread -Wl,--no-whole-archive
OpenSLES
sndfile
openal
m
z
stdc++
FLAC
vorbis
vorbisfile
vorbisenc
ogg
vitaGL
vitashark
SceShaccCgExt
mathneon
mpg123
curl
ssl
crypto
taihen_stub
kubridge_stub
SceAppMgr_stub
SceAppUtil_stub
SceAudio_stub
SceAudioIn_stub
SceCtrl_stub
SceCommonDialog_stub
SceDisplay_stub
SceKernelDmacMgr_stub
SceFios2_stub
SceGxm_stub
SceMotion_stub
SceNet_stub
SceShaccCg_stub
SceSysmodule_stub
ScePower_stub
SceTouch_stub
SceVshBridge_stub
SceAvPlayer_stub
SceNpTrophy_stub
)
vita_create_self(loader2.bin YoYoLoader UNSAFE)
else()
add_executable(YoYoLoader
selector/main.cpp
selector/dialogs.cpp
selector/strings.cpp
selector/player.cpp
loader/qoi_decoder.c
loader/ioapi.c
loader/unzip.c
loader/zip.c
loader/dialog.c
loader/so_util.c
)
target_link_libraries(YoYoLoader
-Wl,--whole-archive pthread -Wl,--no-whole-archive
OpenSLES
sndfile
FLAC
vorbis
vorbisenc
ogg
imgui
m
z
stdc++
vitaGL
vitashark
SceShaccCgExt
mathneon
curl
ssl
crypto
taihen_stub
kubridge_stub
SceAppMgr_stub
SceAppUtil_stub
SceAudio_stub
SceAudioIn_stub
SceCtrl_stub
SceCommonDialog_stub
SceDisplay_stub
SceKernelDmacMgr_stub
SceGxm_stub
SceNet_stub
SceShaccCg_stub
SceSysmodule_stub
ScePower_stub
SceTouch_stub
SceVshBridge_stub
SceAvPlayer_stub
)
vita_create_self(eboot.bin YoYoLoader UNSAFE)
vita_create_vpk(YoYoLoader.vpk ${VITA_TITLEID} eboot.bin
VERSION ${VITA_VERSION}
NAME ${VITA_APP_NAME}
FILE ${CMAKE_SOURCE_DIR}/livearea/icon0.png sce_sys/icon0.png
${CMAKE_SOURCE_DIR}/livearea/default_gate.png sce_sys/livearea/contents/default_gate.png
${CMAKE_SOURCE_DIR}/livearea/bg0.png sce_sys/livearea/contents/bg0.png
${CMAKE_SOURCE_DIR}/livearea/template.xml sce_sys/livearea/contents/template.xml
${CMAKE_BINARY_DIR}/loader.bin loader.bin
${CMAKE_BINARY_DIR}/loader2.bin loader2.bin
${CMAKE_SOURCE_DIR}/translations/Czech.ini lang/Czech.ini
${CMAKE_SOURCE_DIR}/translations/English.ini lang/English.ini
${CMAKE_SOURCE_DIR}/translations/German.ini lang/German.ini
${CMAKE_SOURCE_DIR}/translations/Italian.ini lang/Italian.ini
${CMAKE_SOURCE_DIR}/translations/Spanish.ini lang/Spanish.ini
${CMAKE_SOURCE_DIR}/translations/Russian.ini lang/Russian.ini
${CMAKE_SOURCE_DIR}/translations/Ukrainian.ini lang/Ukrainian.ini
${CMAKE_SOURCE_DIR}/translations/Portuguese_BR.ini lang/Portuguese_BR.ini
${CMAKE_SOURCE_DIR}/translations/Ryukyuan.ini lang/Ryukyuan.ini
${CMAKE_SOURCE_DIR}/translations/Japanese.ini lang/Japanese.ini
${CMAKE_SOURCE_DIR}/translations/Chinese_Simplified.ini lang/Chinese_Simplified.ini
${CMAKE_SOURCE_DIR}/translations/Chinese_Traditional.ini lang/Chinese_Traditional.ini
${CMAKE_SOURCE_DIR}/Roboto.ttf Roboto.ttf
)
endif()