-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
36 lines (26 loc) · 1.18 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
cmake_minimum_required(VERSION 3.8)
project(SuperMarioEclipse VERSION 1.0)
set(CMAKE_CXX_STANDARD 20)
file(GLOB SUPER_MARIO_ECLIPSE_SRC
"src/*.c"
"src/*.cpp"
"src/*/*.c"
"src/*/*.cpp"
"include/*.h"
"include/*.hxx"
"include/*/*.h"
"include/*/*.hxx"
)
add_executable(SuperMarioEclipse ${SUPER_MARIO_ECLIPSE_SRC} "src/object/elevator_object.cpp")
add_subdirectory(lib/BetterSunshineEngine)
target_link_libraries(SuperMarioEclipse PUBLIC BetterSunshineEngine)
target_include_directories(SuperMarioEclipse PUBLIC "include")
target_compile_options(SuperMarioEclipse PUBLIC ${SMS_COMPILE_FLAGS})
target_link_options(SuperMarioEclipse PUBLIC ${SMS_LINK_FLAGS})
list(APPEND SUPER_MARIO_ECLIPSE_CONFIG_DEFINES "KURIBO_NO_TYPES" "SUPER_MARIO_ECLIPSE_VERSION=\"v1.0\"")
target_compile_definitions(SuperMarioEclipse PUBLIC ${SUPER_MARIO_ECLIPSE_CONFIG_DEFINES})
add_custom_target(${PROJECT_NAME}.kxe ALL DEPENDS ${PROJECT_NAME})
add_custom_command(
TARGET ${PROJECT_NAME}.kxe
COMMAND ${PROJECT_SOURCE_DIR}/lib/BetterSunshineEngine/tools/KuriboConverter.exe ARGS ${PROJECT_NAME} ${PROJECT_NAME}.kxe ${PROJECT_SOURCE_DIR}/lib/BetterSunshineEngine/maps/${SMS_REGION}.map
)