RogueLife/CMakeLists.txt

40 lines
1009 B
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-02 10:06:10 +02:00
find_package(Gint 2.5 REQUIRED)
if("${FXSDK_PLATFORM_LONG}" STREQUAL fx9860G)
message(FATAL_ERROR "This game does not support the fx-9860G!")
endif()
set(SOURCES
src/entities.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
)
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)
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)