# 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) set(CMAKE_C_STANDARD 99) include_directories(inc out raygint/include) set(SOURCES src/main.c src/input.c src/level.c src/player.c src/util.c src/camera.c src/anim.c src/shatter.c src/particles.c src/stars.c src/results.c raygint/src/display.c raygint/src/keyboard.c ) set(ASSETS res/tileset.png res/shatter.png res/player.png res/title.png res/font.png ${LEVELS} ) set(FLAGS -Wall -Wextra -Wshadow -Wswitch-default -Wswitch-enum -Wunreachable-code -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Werror-implicit-function-declaration -O3 -Wno-incompatible-pointer-types ) 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}) target_compile_options(target PRIVATE ${FLAGS} -DGINT) 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}) target_compile_options(target PRIVATE ${FLAGS} -DRAYLIB -g) target_link_libraries(target raylib) endif()