RogueLife/CMakeLists.txt

59 lines
1.6 KiB
CMake
Raw Normal View History

# 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)
2021-06-09 12:18:51 +02:00
find_package(Gint 2.5.2 REQUIRED)
2021-06-02 15:40:32 +02:00
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
2021-06-09 20:47:39 +02:00
src/anim.c
src/entities.c
2021-06-04 15:14:12 +02:00
src/game.c
src/geometry.c
src/level.c
src/main.c
src/map.c
src/render.c
)
set(ASSETS
2021-06-02 09:38:59 +02:00
assets-cg/tileset_base.png
assets-cg/tileset_decor.png
assets-cg/levels/demo.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
2021-06-11 10:32:56 +02:00
# Enemies: Slime
assets-cg/enemies/slime_idle_down.png
)
fxconv_declare_assets(${ASSETS} ${ASSETS} WITH_METADATA)
2021-06-02 09:38:59 +02:00
fxconv_declare_converters(assets-cg/converters.py)
add_executable(addin ${SOURCES} ${ASSETS})
target_compile_options(addin PRIVATE -Wall -Wextra -Os)
2021-06-02 15:40:32 +02:00
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)