Pinball/CMakeLists.txt

47 lines
1.2 KiB
CMake
Raw Permalink Normal View History

2023-05-27 21:48:20 +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)
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
2023-05-27 21:48:20 +02:00
# ...
)
# 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
2023-09-11 22:43:25 +02:00
# assets-cg/abyss.png
2023-05-27 21:48:20 +02:00
# ...
)
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"
2023-05-30 08:02:52 +02:00
NAME " " ICONS assets-cg/icon-uns.png assets-cg/icon-sel.png)
2023-05-27 21:48:20 +02:00
endif()