2021-05-30 21:59:09 +02:00
|
|
|
# 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-02 10:06:10 +02:00
|
|
|
find_package(Gint 2.5 REQUIRED)
|
2021-05-30 21:59:09 +02:00
|
|
|
|
|
|
|
if("${FXSDK_PLATFORM_LONG}" STREQUAL fx9860G)
|
|
|
|
message(FATAL_ERROR "This game does not support the fx-9860G!")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(SOURCES
|
2021-06-01 22:06:58 +02:00
|
|
|
src/entities.c
|
2021-06-01 17:49:29 +02:00
|
|
|
src/geometry.c
|
2021-05-30 21:59:09 +02:00
|
|
|
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
|
2021-05-30 21:59:09 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
fxconv_declare_assets(${ASSETS} ${ASSETS} WITH_METADATA)
|
2021-06-02 09:38:59 +02:00
|
|
|
fxconv_declare_converters(assets-cg/converters.py)
|
2021-05-30 21:59:09 +02:00
|
|
|
|
|
|
|
add_executable(addin ${SOURCES} ${ASSETS})
|
|
|
|
target_compile_options(addin PRIVATE -Wall -Wextra -Os)
|
|
|
|
target_link_libraries(addin 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)
|