-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
98 lines (84 loc) · 2.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
cmake_minimum_required(VERSION 3.19)
set(CMAKE_TOOLCHAIN_FILE "$ENV{SCE_PSP2_SDK_DIR}/host_tools/build/cmake/psp2-snc-toolchain.cmake")
project(VitaMediaPlayer)
include(VitaDevelopmentSuite)
set(CMAKE_C_STANDARD 99)
add_compile_options(
-Xdiag=0 -Xquit=2
)
add_link_options(
-s
)
FUNCTION(ADD_RESOURCES out_var)
SET(result)
FOREACH(in_f ${ARGN})
SET(out_f "${CMAKE_CURRENT_BINARY_DIR}/${in_f}.o")
GET_FILENAME_COMPONENT(out_dir ${out_f} DIRECTORY)
ADD_CUSTOM_COMMAND(OUTPUT ${out_f}
COMMAND ${CMAKE_COMMAND} -E make_directory ${out_dir}
COMMAND $ENV{SCE_PSP2_SDK_DIR}/host_tools/build/bin/psp2bin "${in_f}"
-b2e -o "${out_f}"
DEPENDS ${in_f}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMENT "Building resource ${out_f}"
VERBATIM
)
LIST(APPEND result ${out_f})
ENDFOREACH()
SET(${out_var} "${result}" PARENT_SCOPE)
ENDFUNCTION()
file(GLOB res_files RELATIVE
${CMAKE_SOURCE_DIR}
resources/*.png
)
add_resources(player_resources ${res_files})
include_directories(
${VDSUITE_USER_INCLUDE_DIRECTORIES}
${VDSUITE_STANDARD_INCLUDE_DIRECTORIES}
src/include
)
link_directories(
${VDSUITE_LIBRARY_DIRECTORIES}
${CMAKE_CURRENT_BINARY_DIR}
)
add_executable(${PROJECT_NAME}
${player_resources}
src/main.c
src/utils.c
src/dir.c
src/fs.c
src/texture.c
src/commonValues.c
src/menus/menuMain.c
src/menus/menuInfo.c
src/avplayer/avsubs.c
src/avplayer/avplayer.c
src/avplayer/avsound.c
src/avplayer/avplayerUtils.c
src/avplayer/overlay.c
)
target_link_libraries(${PROJECT_NAME}
vita2d_sys_stub
SceKernel_stub
SceAvcodec_stub
SceVideodec_stub
SceAppUtil_stub
SceAvPlayer_stub
SceAudio_stub
SceCtrl_stub
SceDisplay_stub
SceSysmodule_stub
SceIofilemgr_stub
SceGxm_stub
SceThreadmgr_stub
SceModulemgr_stub
)
VDSuiteCreateSfo(vmp-param.sfo param.yml)
VDSuitePackage(${PROJECT_NAME}.vpk
FILES
$<TARGET_FILE:${PROJECT_NAME}> eboot.bin
vmp-param.sfo sce_sys/param.sfo
resources/OpenSans-Bold.ttf OpenSans-Bold.ttf
modules modules
VMP_livearea sce_sys
)