68 lines
1.7 KiB
CMake
68 lines
1.7 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(ScreenSaver VERSION 1.0 LANGUAGES CXX C ASM)
|
|
|
|
include(GenerateG3A)
|
|
include(Fxconv)
|
|
|
|
find_package(Gint 2.9 REQUIRED)
|
|
find_package(LibProf 2.4 REQUIRED)
|
|
|
|
|
|
set(SOURCES
|
|
src/main.cpp
|
|
|
|
src/utilities/fast_trig.cpp
|
|
src/utilities/extrakeyboard.cpp
|
|
src/utilities/utilities.cpp
|
|
src/utilities/vector2D.cpp
|
|
src/utilities/3Dtransform.cpp
|
|
src/utilities/trajectory.cpp
|
|
|
|
src/effects/plasma.cpp
|
|
src/effects/morph.cpp
|
|
src/effects/matrix.cpp
|
|
src/effects/lens.cpp
|
|
src/effects/firecube.cpp
|
|
src/effects/morphfire.cpp
|
|
src/effects/linemorph.cpp
|
|
src/effects/rotozoom.cpp
|
|
src/effects/spline.cpp
|
|
src/effects/splineblur.cpp
|
|
src/effects/starfield.cpp
|
|
src/effects/moire.cpp
|
|
src/effects/raindrops.cpp
|
|
src/effects/rotatesphere.cpp
|
|
src/effects/motionblur.cpp
|
|
src/effects/fire.cpp
|
|
src/effects/dotedflag.cpp
|
|
)
|
|
|
|
set(ASSETS_cg
|
|
assets-cg/fontmatrix.png
|
|
assets-cg/fontlabel.png
|
|
|
|
assets-cg/bglens.png
|
|
assets-cg/tile.png
|
|
assets-cg/xorcircles.png
|
|
assets-cg/mapworld.png
|
|
assets-cg/circuit.png
|
|
assets-cg/earth16c.png
|
|
|
|
assets-cg/optionbox.png
|
|
)
|
|
|
|
fxconv_declare_assets(${ASSETS_cg} WITH_METADATA)
|
|
|
|
add_executable(ssaver ${SOURCES} ${ASSETS} ${ASSETS_${FXSDK_PLATFORM}})
|
|
target_compile_options(ssaver PRIVATE -Wall -Wextra -Og -std=c++20)
|
|
target_link_options(ssaver PRIVATE -Wl,-Map=Build_Addin.map -Wl,--print-memory-usage -fno-use-cxa-atexit -fpermissive)
|
|
target_link_libraries(ssaver -lnum LibProf::LibProf Gint::Gint -lstdc++)
|
|
|
|
if("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50)
|
|
generate_g3a(TARGET ssaver OUTPUT "SSaver.g3a"
|
|
NAME " " ICONS assets-cg/icon-uns.png assets-cg/icon-sel.png)
|
|
endif()
|