2021-05-26 13:32:32 +02:00
|
|
|
# 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)
|
|
|
|
# replace this with your project's name
|
|
|
|
project(Kimeera C)
|
|
|
|
|
|
|
|
include(GenerateG1A)
|
|
|
|
include(GenerateG3A)
|
|
|
|
include(Fxconv)
|
|
|
|
find_package(Gint 2.5 REQUIRED)
|
|
|
|
|
|
|
|
include_directories(include)
|
|
|
|
|
|
|
|
set(SOURCES
|
|
|
|
src/main.c
|
2021-05-27 00:07:12 +02:00
|
|
|
src/entity/print.c
|
|
|
|
src/entity/init.c
|
2021-05-26 13:41:38 +02:00
|
|
|
src/disp/display.c
|
|
|
|
src/disp/print.c
|
|
|
|
src/disp/init.c
|
|
|
|
src/disp/clear.c
|
2021-05-26 13:32:32 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
set(ASSETS
|
|
|
|
)
|
|
|
|
|
|
|
|
set(ASSETS_fx
|
2021-05-26 15:45:03 +02:00
|
|
|
assets-fx/kenney_mini.png
|
2021-05-26 13:32:32 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
set(ASSETS_cg
|
|
|
|
)
|
|
|
|
|
|
|
|
# Compile flags
|
|
|
|
set(FLAGS
|
|
|
|
-std=c11
|
|
|
|
-Wall -Wextra -pedantic
|
|
|
|
-Wshadow
|
|
|
|
-Wswitch-default -Wswitch-enum
|
|
|
|
-Wunreachable-code
|
|
|
|
-Wstrict-prototypes -Wmissing-prototypes
|
|
|
|
-Werror-implicit-function-declaration
|
|
|
|
-Os
|
|
|
|
)
|
|
|
|
|
|
|
|
fxconv_declare_assets(${ASSETS} ${ASSETS_fx} ${ASSETS_cg} WITH_METADATA)
|
|
|
|
|
|
|
|
add_executable(Main ${SOURCES} ${ASSETS} ${ASSETS_${FXSDK_PLATFORM}})
|
|
|
|
target_compile_options(Main PRIVATE ${FLAGS})
|
|
|
|
target_link_libraries(Main Gint::Gint)
|
|
|
|
|
|
|
|
if("${FXSDK_PLATFORM_LONG}" STREQUAL fx9860G)
|
|
|
|
generate_g1a(
|
|
|
|
TARGET Main
|
|
|
|
OUTPUT "${PROJECT_NAME}.g1a"
|
|
|
|
NAME "${PROJECT_NAME}"
|
|
|
|
ICON assets-fx/icon.png)
|
|
|
|
elseif("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50)
|
|
|
|
generate_g3a(
|
|
|
|
TARGET Main
|
|
|
|
OUTPUT "${PROJECT_NAME}.g3a"
|
|
|
|
NAME "${PROJECT_NAME}"
|
|
|
|
ICONS assets-cg/icon-uns.png assets-cg/icon-sel.png)
|
|
|
|
endif()
|