Small "engine" made by a creep.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.2 KiB

# 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(RC C)
include(GenerateG3A)
include(Fxconv)
find_package(Gint 2.5.3 REQUIRED)
find_package(LibImg 2.4.0 REQUIRED)
include_directories(include)
set(SOURCES
src/main.c
src/entity/collide.c
src/entity/draw_hitbox.c
src/entity/init.c
src/entity/move.c
src/wall/init.c
src/player/update.c
src/player/init.c
src/util.c
)
set(ASSETS
)
set(FLAGS
-Wall -Wextra -Wshadow -Wswitch-default -Wswitch-enum
-Wunreachable-code -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition -Werror-implicit-function-declaration
-fplan9-extensions -std=c99 -O3
)
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)
target_link_options(${PROJECT_NAME} PRIVATE -Wl,-Map=map)
generate_g3a(TARGET ${PROJECT_NAME}
OUTPUT "${PROJECT_NAME}.g3a"
NAME "${PROJECT_NAME}"
ICONS assets/graphics/icon-uns.png assets/graphics/icon-sel.png)