-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
95 lines (76 loc) · 2.39 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
cmake_minimum_required(VERSION 3.12)
set(CMAKE_TOOLCHAIN_FILE "$ENV{SCE_PSP2_SDK_DIR}/host_tools/build/cmake/psp2-snc-toolchain.cmake")
project(QuickMenuReborn)
include(VitaDevelopmentSuite)
file(GLOB user_cppfiles
"${CMAKE_SOURCE_DIR}/src/user/*.cpp"
)
file(GLOB user_cfiles
"${CMAKE_SOURCE_DIR}/src/user/*.c"
)
file(GLOB user_hfiles
"${CMAKE_SOURCE_DIR}/src/user/*.h"
)
file(GLOB qm_reborn_includes
"${CMAKE_SOURCE_DIR}/src/quickmenureborn/*.h"
)
set(CMAKE_C_STANDARD 99)
set(CMAKE_CXX_STANDARD 11)
enable_language(EMD)
add_compile_options(
-D_SCE_TARGET_OS_PSP2=1 -Xdiag=0 -Xquit=2
)
add_link_options(
--prx-no-runtime-support
)
include_directories(
${CMAKE_SOURCE_DIR}
${VDSUITE_USER_INCLUDE_DIRECTORIES}
${VDSUITE_STANDARD_INCLUDE_DIRECTORIES}
)
link_directories(
${VDSUITE_LIBRARY_DIRECTORIES}
)
# Main Plugin
add_library(${PROJECT_NAME} MODULE
${user_cppfiles}
${user_cfiles}
${user_hfiles}
${qm_reborn_includes}
QuickMenuReborn.emd
)
target_link_libraries(${PROJECT_NAME}
SceKernel_stub
SceThreadmgr_stub
SceDbg_stub
SceAppMgrUser_stub
SceRegMgr_stub
SceDisplay_stub
ScePafStdc_stub_weak
ScePafThread_stub_weak
ScePafTopLevel_stub_weak
ScePafWidget_stub_weak
ScePafCommon_stub_weak
ScePafGraphics_stub_weak
ScePafMisc_stub_weak
ScePafResource_stub_weak
)
VDSuiteSignElf(${PROJECT_NAME}.suprx ${PROJECT_NAME})
VDSuiteCreateStubs(stubs ${PROJECT_NAME}.emd
LIBRARIES
QuickMenuReborn_stub
QuickMenuReborn_stub_weak
)
# Generate VitaSDK stubs
add_custom_command(TARGET QuickMenuReborn POST_BUILD
COMMAND $ENV{SCE_PSP2_SDK_DIR}/host_tools/build/bin/vdsuite-libgen.exe ${CMAKE_SOURCE_DIR}/QuickMenuReborn.yml ${CMAKE_BINARY_DIR}/vitasdk_stubs --output-kind VitasdkStub
)
add_custom_command(TARGET QuickMenuReborn POST_BUILD
COMMAND python ${CMAKE_SOURCE_DIR}/resource/cxml/appinfo/appinfo_compiler.py -o ${CMAKE_SOURCE_DIR}/resource/qmr_plugin.rco ${CMAKE_SOURCE_DIR}/resource/src/qmr_plugin.xml
)
add_custom_target(install_vdsuite
COMMAND xcopy /E /I /H /Y ..\\src\\quickmenureborn\\ %SCE_PSP2_SDK_DIR%\\target\\include\\vdsuite\\user\\quickmenureborn\\
COMMAND xcopy /E /I /H /Y stubs\\libQuickMenuReborn_stub.a %SCE_PSP2_SDK_DIR%\\target\\lib\\vdsuite\\
COMMAND xcopy /E /I /H /Y stubs\\libQuickMenuReborn_stub_weak.a %SCE_PSP2_SDK_DIR%\\target\\lib\\vdsuite\\
)
add_subdirectory(sample_plugin)