39 lines
1.1 KiB
CMake
39 lines
1.1 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(Schmup 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/utilities.cpp
|
|
src/particles.cpp
|
|
src/starfieldshader.cpp
|
|
# ...
|
|
)
|
|
set(ASSETS_cg
|
|
assets-cg/font.png
|
|
assets-cg/Sprites/emp_circ.png
|
|
assets-cg/Sprites/fill_circ.png
|
|
# ...
|
|
)
|
|
|
|
fxconv_declare_assets(${ASSETS} ${ASSETS_fx} ${ASSETS_cg} WITH_METADATA)
|
|
|
|
add_executable(shmup ${SOURCES} ${ASSETS} ${ASSETS_${FXSDK_PLATFORM}})
|
|
target_compile_options(shmup PRIVATE -Wall -Wextra -Os -std=c++20)
|
|
target_link_options(shmup PRIVATE -Wl,-Map=Build_Addin.map -Wl,--print-memory-usage -fpermissive)
|
|
target_link_libraries(shmup Azur::Azur -lnum LibProf::LibProf Gint::Gint -lstdc++)
|
|
|
|
if("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50)
|
|
generate_g3a(TARGET shmup OUTPUT "MyShmup.g3a"
|
|
NAME "MyShmup" ICONS assets-cg/icon-uns.png assets-cg/icon-sel.png)
|
|
endif()
|