momento/CMakeLists.txt

48 lines
1.2 KiB
CMake
Raw Normal View History

2021-03-28 19:35:07 +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.18)
project(MTEM)
include(GenerateG3A)
include(Fxconv)
2021-03-30 22:57:49 +02:00
find_package(Gint 2.3 REQUIRED)
find_package(LibImg 2.2 REQUIRED)
2021-03-28 19:35:07 +02:00
include_directories(include)
set(SOURCES
src/main.c
src/level/load.c
src/level/draw.c
src/player/init.c
src/player/draw.c
2021-03-30 01:42:11 +02:00
src/player/update.c
src/player/collide.c
2021-03-28 19:35:07 +02:00
)
set(ASSETS
assets/graphics/tileset.png
assets/graphics/player.png
assets/graphics/burst.png
2021-03-28 19:35:07 +02:00
)
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)
target_link_libraries(${PROJECT_NAME} LibImg::LibImg)
2021-03-28 19:35:07 +02:00
generate_g3a(TARGET ${PROJECT_NAME}
OUTPUT "${PROJECT_NAME}.g3a"
NAME "${PROJECT_NAME}"
ICONS assets/graphics/icon-uns.png assets/graphics/icon-sel.png)