protomine/CMakeLists.txt

53 lines
1.0 KiB
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(ProtoMine C)
include(GenerateG3A)
include(Fxconv)
find_package(Gint 2.5 REQUIRED)
include_directories(include)
set(SOURCES
src/main.c
src/player/update.c
src/player/init.c
src/player/draw.c
src/game/init.c
src/grid/get_set.c
src/grid/alloc.c
src/grid/random_walker.c
src/grid/draw.c
src/grid/shop.c
)
set(ASSETS
assets/player.png
assets/tileset.png
)
set(FLAGS
-std=c99
-Wall -Wextra -pedantic
-Wshadow
-Wswitch-default -Wswitch-enum
-Wunreachable-code
-Wstrict-prototypes -Wmissing-prototypes
-Werror-implicit-function-declaration
-Os
)
fxconv_declare_assets(${ASSETS} WITH_METADATA)
add_executable(Main ${SOURCES} ${ASSETS})
target_compile_options(Main PRIVATE ${FLAGS})
target_link_libraries(Main Gint::Gint)
generate_g3a(
TARGET Main
OUTPUT "${PROJECT_NAME}.g3a"
NAME "${PROJECT_NAME}"
ICONS assets/icon-uns.png assets/icon-sel.png)