crystal-tower/CMakeLists.txt

65 lines
1.4 KiB
CMake
Raw Permalink Normal View History

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)
2021-11-16 23:02:07 +01:00
set(CMAKE_C_STANDARD 99)
2021-11-09 22:28:28 +01:00
2021-11-17 14:51:05 +01:00
include_directories(inc out raygint/include)
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-16 23:02:07 +01:00
raygint/src/display.c
2021-11-17 14:51:05 +01:00
raygint/src/keyboard.c
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
2021-11-17 14:51:05 +01:00
-O3 -Wno-incompatible-pointer-types
2021-11-09 22:28:28 +01:00
)
2021-11-16 23:02:07 +01:00
if ("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50)
find_package(Gint 2.6.0 REQUIRED)
include(GenerateG3A)
include(Fxconv)
fxconv_declare_assets(${ASSETS} WITH_METADATA)
add_executable(target ${SOURCES} ${ASSETS})
2021-11-16 23:11:16 +01:00
target_compile_options(target PRIVATE ${FLAGS} -DGINT)
2021-11-16 23:02:07 +01:00
target_link_libraries(target Gint::Gint)
target_link_options(target PRIVATE -Wl,-Map=map)
generate_g3a(TARGET target
OUTPUT "${PROJECT_NAME}.g3a"
NAME ""
ICONS res/icon-uns.png res/icon-sel.png
)
else()
add_executable(target ${SOURCES})
2021-11-17 14:51:05 +01:00
target_compile_options(target PRIVATE ${FLAGS} -DRAYLIB -g)
2021-11-16 23:02:07 +01:00
target_link_libraries(target raylib)
endif()