Pinball/CMakeLists.txt

47 lines
1.2 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(Pinball VERSION 1.0 LANGUAGES CXX C ASM)
include(GenerateG3A)
include(Fxconv)
find_package(Azur 0.1 REQUIRED)
find_package(Gint 2.9 REQUIRED)
find_package(LibProf 2.4 REQUIRED)
set(SOURCES
src/main.cpp
src/Shaders/circle.cpp
src/Shaders/poly.cpp
src/Shaders/filledcircle.cpp
src/Shaders/filledpoly.cpp
src/Shaders/line.cpp
# ...
)
# Shared assets, fx-9860G-only assets and fx-CG-50-only assets
set(ASSETS
# ...
)
set(ASSETS_cg
assets-cg/font.png
assets-cg/font_pinball.png
# assets-cg/abyss.png
# ...
)
fxconv_declare_assets(${ASSETS} ${ASSETS_cg} WITH_METADATA)
add_executable(myaddin ${SOURCES} ${ASSETS} ${ASSETS_${FXSDK_PLATFORM}})
target_compile_options(myaddin PRIVATE -Wall -Wextra -O3 -std=c++20)
target_link_options(myaddin PRIVATE -Wl,-Map=Build_Addin.map -Wl,--print-memory-usage)
target_link_libraries(myaddin Azur::Azur -lnum LibProf::LibProf Gint::Gint -lstdc++)
if("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50)
generate_g3a(TARGET myaddin OUTPUT "Pinball.g3a"
NAME " " ICONS assets-cg/icon-uns.png assets-cg/icon-sel.png)
endif()