forked from RSDKModding/Sonic-Mania-Decompilation
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathCMakeLists.txt
42 lines (34 loc) · 934 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
# Basic CMake that uses All.c
cmake_minimum_required(VERSION 3.7)
project(SonicMania)
set(GAME_NAME SonicMania CACHE STRING "The game directory to look into")
set(OUTPUT_NAME "Game" CACHE STRING "The name of the built library")
set(sources
${GAME_NAME}/Game.c
${GAME_NAME}/Objects/All.c
)
if (VITA)
set(VITASDK_CMAKE_FILE "$ENV{VITASDK}/share/vita.cmake" CACHE PATH "VitaSDK CMake functions file")
include("${VITASDK_CMAKE_FILE}" REQUIRED)
add_executable(SonicMania
${sources}
)
else()
add_library(SonicMania SHARED
${sources}
)
endif()
target_include_directories(SonicMania PRIVATE
${GAME_NAME}/
${GAME_NAME}/Objects/
)
if (VITA)
vita_create_self(${OUTPUT_NAME}.suprx SonicMania
GEN_EXPORTS export.yml
UNSAFE
)
else()
set_target_properties(SonicMania PROPERTIES OUTPUT_NAME ${OUTPUT_NAME})
endif()
unset(GAME_NAME CACHE)
unset(OUTPUT_NAME CACHE)