mirror of https://git.sr.ht/~kikoodx/momento
39 lines
957 B
CMake
39 lines
957 B
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.18)
|
|
project(MTEM)
|
|
|
|
include(GenerateG3A)
|
|
include(Fxconv)
|
|
find_package(Gint 2.1 REQUIRED)
|
|
|
|
include_directories(include)
|
|
|
|
set(SOURCES
|
|
src/main.c
|
|
src/level/load.c
|
|
src/level/draw.c
|
|
)
|
|
|
|
set(ASSETS
|
|
assets/graphics/tileset.png
|
|
)
|
|
|
|
set(FLAGS
|
|
-Wall -Wextra -Wshadow -Wswitch-default -Wswitch-enum
|
|
-Wunreachable-code -Wstrict-prototypes -Wmissing-prototypes
|
|
-Wold-style-definition -Werror-implicit-function-declaration
|
|
-std=c11 -pedantic -Os)
|
|
|
|
fxconv_declare_assets(${ASSETS} WITH_METADATA)
|
|
|
|
add_executable(${PROJECT_NAME} ${SOURCES} ${ASSETS})
|
|
target_compile_options(${PROJECT_NAME} PRIVATE ${FLAGS})
|
|
target_link_libraries(${PROJECT_NAME} Gint::Gint)
|
|
|
|
generate_g3a(TARGET ${PROJECT_NAME}
|
|
OUTPUT "${PROJECT_NAME}.g3a"
|
|
NAME "${PROJECT_NAME}"
|
|
ICONS assets/graphics/icon-uns.png assets/graphics/icon-sel.png)
|