74 lines
1.9 KiB
CMake
74 lines
1.9 KiB
CMake
# Configure with [fxsdk build-fx] or [fxsdk build-cg], which provide the
|
|
# toolchain file and module path of the fxSDK
|
|
|
|
cmake_minimum_required(VERSION 3.15)
|
|
project(RogueLife)
|
|
|
|
include(GenerateG1A)
|
|
include(GenerateG3A)
|
|
include(Fxconv)
|
|
find_package(Gint 2.5.2 REQUIRED)
|
|
find_package(LibProf 2.4 REQUIRED)
|
|
|
|
if("${FXSDK_PLATFORM_LONG}" STREQUAL fx9860G)
|
|
message(FATAL_ERROR "This game does not support the fx-9860G!")
|
|
endif()
|
|
|
|
set(SOURCES
|
|
src/anim.c
|
|
src/enemies.c
|
|
src/entities.c
|
|
src/game.c
|
|
src/geometry.c
|
|
src/level.c
|
|
src/main.c
|
|
src/map.c
|
|
src/particles.c
|
|
src/pathfinding.c
|
|
src/render.c
|
|
src/util.c
|
|
)
|
|
set(ASSETS
|
|
# Tilesets
|
|
assets-cg/tileset_base.png
|
|
assets-cg/tileset_decor.png
|
|
# Levels
|
|
assets-cg/levels/demo.txt
|
|
assets-cg/levels/1.txt
|
|
# Player animations
|
|
assets-cg/player/player_idle_up.png
|
|
assets-cg/player/player_idle_right.png
|
|
assets-cg/player/player_idle_down.png
|
|
assets-cg/player/player_idle_left.png
|
|
assets-cg/player/player_attack_up.png
|
|
assets-cg/player/player_attack_right.png
|
|
assets-cg/player/player_attack_down.png
|
|
assets-cg/player/player_attack_left.png
|
|
# Skill animations
|
|
assets-cg/skills/swing_up.png
|
|
assets-cg/skills/swing_right.png
|
|
assets-cg/skills/swing_down.png
|
|
assets-cg/skills/swing_left.png
|
|
assets-cg/skills/hit.png
|
|
# Enemies: Slime
|
|
assets-cg/enemies/slime_idle_down.png
|
|
assets-cg/enemies/slime_death.png
|
|
# Enemies: Bat
|
|
assets-cg/enemies/bat_idle_down.png
|
|
assets-cg/enemies/bat_death.png
|
|
# Misc
|
|
assets-cg/font_damage_red.png
|
|
assets-cg/font_damage_white.png
|
|
)
|
|
|
|
fxconv_declare_assets(${ASSETS} ${ASSETS} WITH_METADATA)
|
|
fxconv_declare_converters(assets-cg/converters.py)
|
|
|
|
add_executable(addin ${SOURCES} ${ASSETS})
|
|
target_compile_options(addin PRIVATE -Wall -Wextra -Os)
|
|
target_link_libraries(addin LibProf::LibProf Gint::Gint)
|
|
target_link_options(addin PRIVATE -Wl,-Map=map)
|
|
|
|
generate_g3a(TARGET addin OUTPUT "RogueLif.g3a"
|
|
NAME "RogueLife" ICONS assets-cg/icon-uns.png assets-cg/icon-sel.png)
|