forked from carltheperson/blockamok
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
134 lines (119 loc) · 4.06 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
cmake_minimum_required(VERSION 3.2)
project(blockamokremix C)
add_executable(blockamokremix
"src/main.c"
"src/audio.c"
"src/audio.h"
"src/config.c"
"src/config.h"
"src/draw.c"
"src/draw.h"
"src/game.c"
"src/game.h"
"src/game_init.c"
"src/game_init.h"
"src/general.c"
"src/general.h"
"src/input.c"
"src/input.h"
"src/math_custom.c"
"src/math_custom.h"
"src/text.c"
"src/text_options.c"
"src/text.h"
"src/audio/falling_people.c"
"src/audio/falling_people.h"
"src/audio/falling_up.c"
"src/audio/falling_up.h"
"src/audio/insanity.c"
"src/audio/insanity.h"
"src/audio/mano_-_darkness_in_the_night.c"
"src/audio/mano_-_darkness_in_the_night.h"
"src/audio/spaceranger_50k.c"
"src/audio/spaceranger_50k.h"
"src/audio/ding2_short.c"
"src/audio/ding2_short.h"
"src/audio/ding2_short_reversed.c"
"src/audio/ding2_short_reversed.h"
"src/audio/thunk.c"
"src/audio/thunk.h"
"src/audio/zoom3_short.c"
"src/audio/zoom3_short.h"
"src/fonts/Mono.c"
"src/fonts/Mono.h"
)
find_package(PkgConfig REQUIRED)
if (WIIU)
include("${DEVKITPRO}/wut/share/wut.cmake" REQUIRED)
add_definitions(-DWII_U)
target_link_libraries(blockamokremix -L${DEVKITPRO}/portlibs/wiiu/lib -L${DEVKITPRO}/portlibs/ppc/lib -L${DEVKITPRO}/wut/lib)
PKG_SEARCH_MODULE(SDL2 REQUIRED sdl2)
PKG_SEARCH_MODULE(SDL2MIXER REQUIRED SDL2_mixer>=2.0.0)
PKG_SEARCH_MODULE(SDL2TTF REQUIRED SDL2_ttf>=2.0.0)
INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIRS} ${SDL2MIXER_INCLUDE_DIRS} ${SDL2TTF_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(blockamokremix ${SDL2_LIBRARIES} ${SDL2MIXER_LIBRARIES} ${SDL2TTF_LIBRARIES})
set(SDL2_INCLUDE_DIRS
"${DEVKITPRO}/portlibs/wiiu/include/SDL2;\
${DEVKITPRO}/portlibs/ppc/include;\
${DEVKITPRO}/wut/include;\
${DEVKITPRO}/devkitPPC/powerpc-eabi/include;"
)
include_directories(${SDL2_INCLUDE_DIRS})
wut_create_rpx(blockamokremix)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/blockamokremix.rpx"
DESTINATION "${CMAKE_INSTALL_PREFIX}")
elseif (VITA)
include("${VITASDK}/share/vita.cmake" REQUIRED)
add_definitions(-DVITA)
set(VITA_APP_NAME "Blockamok Remix")
set(VITA_TITLEID "BLOC52665")
set(VITA_VERSION "01.00")
PKG_SEARCH_MODULE(SDL2 REQUIRED sdl2)
PKG_SEARCH_MODULE(SDL2MIXER REQUIRED SDL2_mixer>=2.0.0)
PKG_SEARCH_MODULE(SDL2TTF REQUIRED SDL2_ttf>=2.0.0)
INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIRS} ${SDL2MIXER_INCLUDE_DIRS} ${SDL2TTF_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(blockamokremix ${SDL2_LIBRARIES} ${SDL2MIXER_LIBRARIES} ${SDL2TTF_LIBRARIES})
target_link_libraries(blockamokremix
SceDisplay_stub
SceCtrl_stub
SceAudio_stub
SceSysmodule_stub
SceGxm_stub
SceCommonDialog_stub
SceAppMgr_stub
SceTouch_stub
SceMotion_stub
SceHid_stub
m
)
include_directories("${VITASDK}/arm-vita-eabi/include;${VITASDK}/arm-vita-eabi/include/SDL2;")
vita_create_self(blockamokremix.self blockamokremix)
vita_create_vpk(blockamokremix.vpk ${VITA_TITLEID} blockamokremix.self
VERSION ${VITA_VERSION}
NAME ${VITA_APP_NAME}
FILE release-resources/logo_icon_128.png sce_sys/icon0.png
FILE release-resources/background_vita.png sce_sys/livearea/contents/bg.png
FILE release-resources/logo_startup_vita.png sce_sys/livearea/contents/startup.png
FILE release-resources/template_vita.xml sce_sys/livearea/contents/template.xml
)
elseif (RG35XX)
add_definitions(-DRG35XX)
PKG_SEARCH_MODULE(SDL2 REQUIRED sdl2)
PKG_SEARCH_MODULE(SDL2MIXER REQUIRED SDL2_mixer>=2.0.0)
PKG_SEARCH_MODULE(SDL2TTF REQUIRED SDL2_ttf>=2.0.0)
INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIRS} ${SDL2MIXER_INCLUDE_DIRS} ${SDL2TTF_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${SDL2_LIBRARIES} ${SDL2MIXER_LIBRARIES} ${SDL2TTF_LIBRARIES})
else()
if (LINUX)
add_definitions(-DLINUX)
endif()
PKG_SEARCH_MODULE(SDL2 REQUIRED sdl2)
PKG_SEARCH_MODULE(SDL2MIXER REQUIRED SDL2_mixer>=2.0.0)
PKG_SEARCH_MODULE(SDL2TTF REQUIRED SDL2_ttf>=2.0.0)
INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIRS} ${SDL2MIXER_INCLUDE_DIRS} ${SDL2TTF_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${SDL2_LIBRARIES} ${SDL2MIXER_LIBRARIES} ${SDL2TTF_LIBRARIES})
endif()
unset(WIIU CACHE)
unset(VITA CACHE)
unset(LINUX CACHE)
unset(RG35XX CACHE)