Copy3DEngine/CMakeLists.txt

41 lines
1.1 KiB
Text
Raw Normal View History

2023-07-20 12:31:08 +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)
2024-03-09 21:21:17 +01:00
project(Copy3DEngine)
2023-07-20 12:31:08 +02:00
include(GenerateG3A)
include(Fxconv)
find_package(Gint 2.9 REQUIRED)
find_package(LibProf 2.1 REQUIRED)
2024-03-09 21:21:17 +01:00
# le nom de votre jeu
set(NAMEOFGAME "Test3D")
# Nom de l'auteur -> votre nom/pseudo
set(AUTHOR "Fcalva")
2023-07-20 12:31:08 +02:00
set(SOURCES
src/main.c
src/moteur.c
2024-03-09 21:21:17 +01:00
src/map.c
2023-07-20 12:31:08 +02:00
)
2024-03-09 21:21:17 +01:00
2023-07-20 12:31:08 +02:00
set(ASSETS
assets-cg/textures/briques0.png
assets-cg/textures/buisson1.png
)
2024-03-09 21:21:17 +01:00
fxconv_declare_assets(${ASSETS} WITH_METADATA)
2023-07-20 12:31:08 +02:00
2024-03-09 21:21:17 +01:00
add_executable(Copy3DEngine ${SOURCES} ${ASSETS})
target_compile_options(Copy3DEngine PRIVATE -Wall -Wextra -O2 -g)
2024-03-09 21:21:17 +01:00
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)
2023-07-20 12:31:08 +02:00
if("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50)
2024-03-09 21:21:17 +01:00
generate_g3a(TARGET Copy3DEngine OUTPUT "${NAMEOFGAME}.g3a"
NAME "${NAMEOFGAME}" ICONS assets-cg/icon-uns.png assets-cg/icon-sel.png)
2023-07-20 12:31:08 +02:00
endif()