Mastrix/CMakeLists.txt

54 lines
1.5 KiB
CMake

# 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)
project(Mastrix)
include(GenerateG1A)
include(GenerateG3A)
include(Fxconv)
find_package(Gint 2.9 REQUIRED)
find_package(JustUI 1.3.0 REQUIRED)
find_package(LibImg 2.1 REQUIRED)
AUX_SOURCE_DIRECTORY(src SOURCES)
# Shared assets, fx-9860G-only assets and fx-CG-50-only assets
# HOW TO DEBUG: sh-elf-objdump -d build-cg/mastrix | less
set(ASSETS
# ...
)
set(ASSETS_fx
# ...
)
set(ASSETS_cg
# ...
assets-cg/user.png
assets-cg/hourglass.png
assets-cg/file.png
assets-cg/tweak.png
assets-cg/tbold.png
assets-cg/bouncer.png
assets-cg/cirno.png
assets-cg/marie.png
assets-cg/mastrix-print.png
assets-cg/house.png
assets-cg/uf8x9
assets-cg/uf5x7
)
fxconv_declare_assets(${ASSETS} ${ASSETS_fx} ${ASSETS_cg} WITH_METADATA)
add_executable(mastrix ${SOURCES} ${ASSETS} ${ASSETS_${FXSDK_PLATFORM}})
include_directories(src/include)
target_compile_options(mastrix PRIVATE -Wall -Wextra -Os -g -finstrument-functions)
target_link_libraries(mastrix Gint::Gint JustUI::JustUI LibImg::LibImg)
if("${FXSDK_PLATFORM_LONG}" STREQUAL fx9860G)
# honestly i dont have an fx-9860G to test with.
generate_g1a(TARGET mastrix OUTPUT "MyAddin.g1a"
NAME "MyAddin" ICON assets-fx/icon.png)
elseif("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50)
generate_g3a(TARGET mastrix OUTPUT "Matrix.g3a"
NAME "Mas Trix" ICONS assets-cg/icon-uns.png assets-cg/icon-sel.png)
endif()