-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
126 lines (114 loc) · 3.22 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
## This file is a quick tutorial on writing CMakeLists for targeting the Vita
cmake_minimum_required(VERSION 2.8)
## This includes the Vita toolchain, must go before project definition
# It is a convenience so you do not have to type
# -DCMAKE_TOOLCHAIN_FILE=$VITASDK/share/vita.toolchain.cmake for cmake. It is
# highly recommended that you include this block for all projects.
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
if(DEFINED ENV{VITASDK})
set(CMAKE_TOOLCHAIN_FILE "$ENV{VITASDK}/share/vita.toolchain.cmake" CACHE PATH "toolchain file")
else()
message(FATAL_ERROR "Please define VITASDK to point to your SDK path!")
endif()
endif()
## Define project parameters here
# Name of the project
project(PSV2DCore)
# This line adds Vita helper macros, must go after project definition in order
# to build Vita specific artifacts (self/vpk).
include("${VITASDK}/share/vita.cmake" REQUIRED)
## Configuration options for this app
# Display name (under bubble in LiveArea)
set(VITA_APP_NAME "PSV 2DCore")
# Unique ID must be exactly 9 characters. Recommended: XXXXYYYYY where X =
# unique string of developer and Y = a unique number for this app
set(VITA_TITLEID "PSVC00000")
# Optional version string to show in LiveArea's more info screen
set(VITA_VERSION "01.11")
## Flags and includes for building
# Note that we make sure not to overwrite previous flags
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
# Optional. You can specify more param.sfo flags this way.
set(VITA_MKSFOEX_FLAGS "${VITA_MKSFOEX_FLAGS} -d PARENTAL_LEVEL=1")
# Add any additional include paths here
include_directories(
)
# Add any additional library paths here
# ${CMAKE_CURRENT_BINARY_DIR} lets you use any library currently being built
link_directories(
${CMAKE_CURRENT_BINARY_DIR}
)
## Build and link
# Add all the files needed to compile here
add_executable(${PROJECT_NAME}
src/main.cpp
src/pch.cpp
src/pch.h
src/vita2d_extended.cpp
src/vita2d_extended.h
src/structs.cpp
src/structs.h
src/utils.cpp
src/utils.h
src/Colors.cpp
src/Colors.h
src/PSV_Core.cpp
src/PSV_Core.h
src/PSV_Utils.cpp
src/PSV_Utils.h
src/Vector2f.cpp
src/Vector2f.h
src/Texture.cpp
src/Texture.h
src/Font.cpp
src/Font.h
src/Music.cpp
src/Music.h
src/SFX.cpp
src/SFX.h
src/Bank.cpp
src/Bank.h
src/Keyboard.cpp
src/Keyboard.h
src/Core.cpp
src/Core.h
src/PosMotion.cpp
src/PosMotion.h
src/Transition.cpp
src/Transition.h
src/GameHandler.cpp
src/GameHandler.h
)
# Library to link to (drop the -l prefix). This will mostly be stubs.
target_link_libraries(${PROJECT_NAME}
SceLibKernel_stub
vita2d
SceDisplay_stub
SceCtrl_stub
SceAudio_stub
SceSysmodule_stub
SceGxm_stub
SceCommonDialog_stub
SceAppUtil_stub
SceIme_stub
SceTouch_stub
png
jpeg
freetype
m
z
c
soloud
pthread
)
## Create Vita files
vita_create_self(${PROJECT_NAME}.self ${PROJECT_NAME})
# The FILE directive lets you add additional files to the VPK, the syntax is
# FILE src_path dst_path_in_vpk. In this case, we add the LiveArea paths.
vita_create_vpk(${PROJECT_NAME}.vpk ${VITA_TITLEID} ${PROJECT_NAME}.self
VERSION ${VITA_VERSION}
NAME ${VITA_APP_NAME}
FILE Resources Resources
FILE sce_sys sce_sys
)