forked from RSDKModding/RSDKv5-Decompilation
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
121 lines (110 loc) · 3.76 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
# THIS CMAKE SHOULD BE USED FOR ANDROID ONLY
# might make this all plats later but not needed for now, the Makefile works fine
cmake_minimum_required(VERSION 3.7)
set(OGG_DIR dependencies/android/libogg)
set(THEORA_DIR dependencies/android/libtheora)
add_library(
libogg
STATIC
${OGG_DIR}/src/bitwise.c
${OGG_DIR}/src/framing.c
)
add_library(libtheora STATIC
${THEORA_DIR}/lib/analyze.c
${THEORA_DIR}/lib/apiwrapper.c
${THEORA_DIR}/lib/bitpack.c
${THEORA_DIR}/lib/cpu.c
${THEORA_DIR}/lib/decapiwrapper.c
${THEORA_DIR}/lib/decinfo.c
${THEORA_DIR}/lib/decode.c
${THEORA_DIR}/lib/dequant.c
${THEORA_DIR}/lib/encapiwrapper.c
${THEORA_DIR}/lib/encfrag.c
${THEORA_DIR}/lib/encinfo.c
${THEORA_DIR}/lib/encode.c
${THEORA_DIR}/lib/encoder_disabled.c
${THEORA_DIR}/lib/enquant.c
${THEORA_DIR}/lib/fdct.c
${THEORA_DIR}/lib/fragment.c
${THEORA_DIR}/lib/huffdec.c
${THEORA_DIR}/lib/huffenc.c
${THEORA_DIR}/lib/idct.c
${THEORA_DIR}/lib/info.c
${THEORA_DIR}/lib/internal.c
${THEORA_DIR}/lib/mathops.c
${THEORA_DIR}/lib/mcenc.c
${THEORA_DIR}/lib/quant.c
${THEORA_DIR}/lib/rate.c
${THEORA_DIR}/lib/state.c
${THEORA_DIR}/lib/tokenize.c
)
target_include_directories(libogg PRIVATE dependencies/android/libogg/include)
target_include_directories(libtheora PRIVATE dependencies/android/libogg/include dependencies/android/libtheora/include)
target_compile_options(libogg PRIVATE -ffast-math -fsigned-char -O2 -fPIC -DPIC -DBYTE_ORDER=LITTLE_ENDIAN -D_ARM_ASSEM_ -w)
target_compile_options(libtheora PRIVATE -ffast-math -fsigned-char -O2 -fPIC -DPIC -DBYTE_ORDER=LITTLE_ENDIAN -D_ARM_ASSEM_ -w)
add_library(RetroEngine SHARED
RSDKv5/main.cpp
RSDKv5/RSDK/Core/RetroEngine.cpp
RSDKv5/RSDK/Core/Math.cpp
RSDKv5/RSDK/Core/Reader.cpp
RSDKv5/RSDK/Core/Link.cpp
RSDKv5/RSDK/Core/ModAPI.cpp
RSDKv5/RSDK/Dev/Debug.cpp
RSDKv5/RSDK/Storage/Storage.cpp
RSDKv5/RSDK/Storage/Text.cpp
RSDKv5/RSDK/Graphics/Drawing.cpp
RSDKv5/RSDK/Graphics/Scene3D.cpp
RSDKv5/RSDK/Graphics/Animation.cpp
RSDKv5/RSDK/Graphics/Sprite.cpp
RSDKv5/RSDK/Graphics/Palette.cpp
RSDKv5/RSDK/Graphics/Video.cpp
RSDKv5/RSDK/Audio/Audio.cpp
RSDKv5/RSDK/Input/Input.cpp
RSDKv5/RSDK/Scene/Scene.cpp
RSDKv5/RSDK/Scene/Collision.cpp
RSDKv5/RSDK/Scene/Object.cpp
RSDKv5/RSDK/Scene/Objects/DefaultObject.cpp
RSDKv5/RSDK/Scene/Objects/DevOutput.cpp
RSDKv5/RSDK/User/Core/UserAchievements.cpp
RSDKv5/RSDK/User/Core/UserCore.cpp
RSDKv5/RSDK/User/Core/UserLeaderboards.cpp
RSDKv5/RSDK/User/Core/UserPresence.cpp
RSDKv5/RSDK/User/Core/UserStats.cpp
RSDKv5/RSDK/User/Core/UserStorage.cpp
dependencies/all/tinyxml2/tinyxml2.cpp
dependencies/all/iniparser/iniparser.cpp
dependencies/all/iniparser/dictionary.cpp
dependencies/all/miniz/miniz.c
dependencies/android/androidHelpers.cpp
)
target_include_directories(RetroEngine PRIVATE
RSDKv5/
dependencies/android/libogg/include/
dependencies/android/libtheora/include/
dependencies/android/
dependencies/all/
dependencies/all/tinyxml2/
dependencies/all/iniparser/
)
target_compile_options(RetroEngine PRIVATE -fexceptions -frtti -DRSDK_USE_OGL -DRETRO_REVISION=3)
find_package(games-controller REQUIRED CONFIG)
find_package(game-activity REQUIRED CONFIG)
find_package(games-frame-pacing REQUIRED CONFIG)
find_package(oboe REQUIRED CONFIG)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -u GameActivity_onCreate")
target_link_libraries(
RetroEngine
android
libogg
libtheora
EGL
GLESv3
log
z
jnigraphics
games-controller::paddleboat_static
game-activity::game-activity
games-frame-pacing::swappy_static
oboe::oboe
OpenSLES
)