feck/CMakeLists.txt

47 lines
1020 B
CMake

# Configure with [fxsdk build-cg], which provide the
# toolchain file and module path of the fxSDK
cmake_minimum_required(VERSION 3.18)
project(FECK C)
set(CMAKE_C_STANDARD 11)
include_directories(inc out raygint/include fe/src)
set(SOURCES
src/main.c
raygint/src/display.c
raygint/src/keyboard.c
fe/src/fe.c
)
set(ASSETS
)
set(FLAGS
-Wall -Wextra -Wshadow -O3
)
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 "${PROJECT_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()