2021-11-09 22:28:28 +01:00
|
|
|
# Configure with [fxsdk build-cg], which provide the
|
|
|
|
# toolchain file and module path of the fxSDK
|
|
|
|
|
|
|
|
cmake_minimum_required(VERSION 3.18)
|
|
|
|
project(CRYSTAL C)
|
|
|
|
|
|
|
|
include(GenerateG3A)
|
|
|
|
include(Fxconv)
|
|
|
|
|
|
|
|
find_package(Gint 2.6.0 REQUIRED)
|
|
|
|
|
2021-11-09 22:34:40 +01:00
|
|
|
include_directories(inc)
|
2021-11-09 22:28:28 +01:00
|
|
|
|
|
|
|
set(SOURCES
|
|
|
|
src/main.c
|
2021-11-09 22:34:40 +01:00
|
|
|
src/input.c
|
2021-11-10 00:37:45 +01:00
|
|
|
src/level.c
|
2021-11-10 06:15:41 +01:00
|
|
|
src/player.c
|
2021-11-10 08:08:29 +01:00
|
|
|
src/util.c
|
2021-11-10 12:10:04 +01:00
|
|
|
src/camera.c
|
2021-11-10 14:05:00 +01:00
|
|
|
src/anim.c
|
2021-11-10 20:44:53 +01:00
|
|
|
src/shatter.c
|
|
|
|
src/particles.c
|
2021-11-12 00:52:28 +01:00
|
|
|
src/stars.c
|
2021-11-12 17:49:16 +01:00
|
|
|
src/results.c
|
2021-11-09 22:28:28 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
set(LEVELS
|
2021-11-11 16:59:37 +01:00
|
|
|
lvl/0.kble
|
2021-11-11 18:31:29 +01:00
|
|
|
lvl/1.kble
|
2021-11-11 16:59:37 +01:00
|
|
|
lvl/2.kble
|
2021-11-12 13:46:06 +01:00
|
|
|
lvl/3.kble
|
2021-11-12 14:34:47 +01:00
|
|
|
lvl/4.kble
|
|
|
|
lvl/5.kble
|
2021-11-12 15:42:07 +01:00
|
|
|
lvl/6.kble
|
2021-11-12 23:24:25 +01:00
|
|
|
lvl/7.kble
|
2021-11-12 23:46:27 +01:00
|
|
|
lvl/8.kble
|
|
|
|
lvl/9.kble
|
2021-11-12 18:30:48 +01:00
|
|
|
lvl/end.kble
|
2021-11-09 22:28:28 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
set(ASSETS
|
2021-11-10 00:37:45 +01:00
|
|
|
res/tileset.png
|
2021-11-10 20:44:53 +01:00
|
|
|
res/shatter.png
|
2021-11-12 00:52:28 +01:00
|
|
|
res/player.png
|
2021-11-12 17:12:13 +01:00
|
|
|
res/title.png
|
2021-11-12 17:49:16 +01:00
|
|
|
res/font.png
|
2021-11-09 22:28:28 +01:00
|
|
|
${LEVELS}
|
|
|
|
)
|
|
|
|
|
|
|
|
set(FLAGS
|
|
|
|
-Wall -Wextra -Wshadow -Wswitch-default -Wswitch-enum
|
|
|
|
-Wunreachable-code -Wstrict-prototypes -Wmissing-prototypes
|
|
|
|
-Wold-style-definition -Werror-implicit-function-declaration
|
|
|
|
-std=c11 -O3
|
|
|
|
)
|
|
|
|
|
|
|
|
fxconv_declare_assets(${ASSETS} WITH_METADATA)
|
|
|
|
|
|
|
|
add_executable(target ${SOURCES} ${ASSETS})
|
|
|
|
target_compile_options(target PRIVATE ${FLAGS})
|
|
|
|
target_link_libraries(target Gint::Gint)
|
|
|
|
target_link_options(target PRIVATE -Wl,-Map=map)
|
|
|
|
|
|
|
|
generate_g3a(TARGET target
|
|
|
|
OUTPUT "${PROJECT_NAME}.g3a"
|
2021-11-12 23:24:25 +01:00
|
|
|
NAME ""
|
2021-11-09 22:28:28 +01:00
|
|
|
ICONS res/icon-uns.png res/icon-sel.png
|
|
|
|
)
|