ScreenSaver/CMakeLists.txt

45 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(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/effects/plasma.cpp
src/effects/morph.cpp
)
set(ASSETS_cg
assets-cg/fontmatrix.png
assets-cg/fontFantasy.png
assets-cg/SlyVTT.png
assets-cg/Selection.png
)
fxconv_declare_assets(${ASSETS_cg} WITH_METADATA)
add_executable(ssaver ${SOURCES} ${ASSETS} ${ASSETS_${FXSDK_PLATFORM}})
target_compile_options(ssaver PRIVATE -Wall -Wextra -O3 -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()