Odyssee/projet/CMakeLists.txt

46 lines
1.1 KiB
CMake
Raw Permalink Normal View History

2021-06-09 21:39:40 +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.15)
2021-06-30 08:30:02 +02:00
project(Odyssee)
2021-06-09 21:39:40 +02:00
include(GenerateG1A)
include(GenerateG3A)
include(Fxconv)
find_package(Gint 2.1 REQUIRED)
set(SOURCES
src/main.c
2021-06-30 08:30:02 +02:00
src/core.c
2021-06-09 21:39:40 +02:00
# ...
)
# Shared assets, fx-9860G-only assets and fx-CG-50-only assets
set(ASSETS
# ...
)
set(ASSETS_fx
2021-06-30 08:30:02 +02:00
assets-fx/odyssee.png
assets-fx/title.png
assets-fx/bgrounds.png
assets-fx/player.png
assets-fx/player_sword.png
2021-06-09 21:39:40 +02:00
# ...
)
set(ASSETS_cg
# ...
)
fxconv_declare_assets(${ASSETS} ${ASSETS_fx} ${ASSETS_cg} WITH_METADATA)
add_executable(myaddin ${SOURCES} ${ASSETS} ${ASSETS_${FXSDK_PLATFORM}})
target_compile_options(myaddin PRIVATE -Wall -Wextra -Os)
target_link_libraries(myaddin Gint::Gint)
if("${FXSDK_PLATFORM_LONG}" STREQUAL fx9860G)
2021-06-30 08:30:02 +02:00
generate_g1a(TARGET myaddin OUTPUT "Odyssee.g1a"
NAME "Odyssee" ICON assets-fx/icon.png)
2021-06-09 21:39:40 +02:00
elseif("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50)
2021-06-30 08:30:02 +02:00
generate_g3a(TARGET myaddin OUTPUT "Odyssee.g3a"
NAME "Odyssee" ICONS assets-cg/icon-uns.png assets-cg/icon-sel.png)
2021-06-09 21:39:40 +02:00
endif()