Copy3DEngine/Examples/AmogusGame/CMakeLists.txt

45 lines
1.3 KiB
Text
Raw Normal View History

2024-03-09 23:17:13 +01: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(Copy3DEngine)
include(GenerateG3A)
include(Fxconv)
find_package(Gint 2.9 REQUIRED)
find_package(LibProf 2.1 REQUIRED)
# le nom de votre jeu
set(NAMEOFGAME "Amogus")
# Nom de l'auteur -> votre nom/pseudo
set(AUTHOR "Fcalva")
set(SOURCES
src/main.c
src/moteur.c
src/map.c
)
set(ASSETS
assets-cg/textures/0.png
assets-cg/textures/1.png
assets-cg/textures/2.png
assets-cg/textures/3.png
assets-cg/textures/4.png
assets-cg/textures/rick.png
)
fxconv_declare_assets(${ASSETS} WITH_METADATA)
add_executable(Copy3DEngine ${SOURCES} ${ASSETS})
target_compile_options(Copy3DEngine PRIVATE -Wall -Wextra -Ofast -fira-region=all -flto -fno-math-errno -funsafe-math-optimizations -fassociative-math -freciprocal-math)
target_compile_definitions(Copy3DEngine PRIVATE NAMEOFGAME="${NAMEOFGAME}" AUTHOR="${AUTHOR}")
target_link_libraries(Copy3DEngine Gint::Gint)
target_link_libraries(Copy3DEngine LibProf::LibProf)
target_link_options(Copy3DEngine PRIVATE -Wl,--print-memory-usage,-flto)
if("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50)
generate_g3a(TARGET Copy3DEngine OUTPUT "${NAMEOFGAME}.g3a"
NAME "${NAMEOFGAME}" ICONS assets-cg/icon-uns.png assets-cg/icon-sel.png)
endif()