-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
46 lines (36 loc) · 994 Bytes
/
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
cmake_minimum_required(VERSION 3.10)
project(Wasm3PSPExample C)
set(CMAKE_C_STANDARD 99)
# For Wasm3
include_directories(~/wasm3/include)
link_directories(~/wasm3/lib)
# Modules
set(PSP_LIBS
pspdebug
pspge
pspdisplay
pspctrl
pspgu
psprtc
)
# For PSP
add_executable(hello_psp main.c)
# Add suffix .elf
set_target_properties(hello_psp PROPERTIES SUFFIX ".elf")
# Link Wasm3
target_link_libraries(hello_psp m3 ${PSP_LIBS})
# Create EBOOT.PBP
add_custom_command(TARGET hello_psp POST_BUILD
# Dummy files(Empty files)
COMMAND touch ICON0.PNG
COMMAND touch ICON1.PMF
COMMAND touch PIC0.PNG
COMMAND touch PIC1.PNG
COMMAND touch SND0.AT3
COMMAND touch DATA.PSAR
COMMAND psp-fixup-imports hello_psp.elf
COMMAND mksfo hello_psp hello_psp.sfo
# Output: EBOOT.PBP
COMMAND pack-pbp EBOOT.PBP hello_psp.sfo ICON0.PNG ICON1.PMF PIC0.PNG PIC1.PNG SND0.AT3 hello_psp.elf DATA.PSAR
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)