Copy3DEngine/CMakeLists.txt

73 lines
1.9 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)
project(Copy3DEngine LANGUAGES C ASM)
2023-07-20 12:31:08 +02:00
2024-09-07 11:42:56 +02:00
include(GenerateG1A)
2024-09-26 19:09:33 +02:00
include(GenerateG3A)
2023-07-20 12:31:08 +02:00
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
2024-10-27 23:52:11 +01:00
set(NAMEOFGAME "Illusion3D")
2024-03-09 21:21:17 +01:00
# Nom de l'auteur -> votre nom/pseudo
set(AUTHOR "Fcalva")
2023-07-20 12:31:08 +02:00
set(SOURCES
2024-10-25 23:05:09 +02:00
#sources du jeu
2023-07-20 12:31:08 +02:00
src/main.c
2024-10-25 23:05:09 +02:00
src/gfx.c
src/map.c
src/game.c
2024-10-09 16:43:10 +02:00
#sources du moteur
2024-10-09 00:18:31 +02:00
eng/moteur.c
eng/map.c
2024-10-22 12:27:16 +02:00
eng/utils.c
2024-10-09 00:18:31 +02:00
eng/sprites.c
2024-10-09 16:43:10 +02:00
eng/game.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
2024-10-27 23:52:11 +01:00
assets-fx/title.png
assets-fx/blood.png
assets-fx/hands0.png
assets-fx/hands1.png
assets-fx/hands2.png
assets-fx/anvil0.png
assets-fx/anvil1.png
assets-fx/anvil2.png
assets-fx/anvil3.png
2024-10-25 23:05:09 +02:00
assets-fx/sprites/friendlyguy.png
assets-fx/sprites/friendlyguy1.png
2024-10-27 23:52:11 +01:00
assets-fx/sprites/anvil_pickup.png
2024-10-25 23:05:09 +02:00
2024-09-07 11:42:56 +02:00
assets-fx/textures/briques0.png
assets-fx/textures/buisson1.png
2024-10-25 23:05:09 +02:00
assets-fx/textures/bwain.png
assets-fx/textures/bwain1.png
assets-fx/textures/meat.png
assets-fx/textures/meat1.png
2023-07-20 12:31:08 +02:00
)
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})
2024-10-25 23:05:09 +02:00
target_compile_options(Copy3DEngine PRIVATE -Wall -Wextra -O2)
2024-10-22 12:27:16 +02:00
target_include_directories(Copy3DEngine PRIVATE "include/")
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
2024-09-07 11:42:56 +02:00
if("${FXSDK_PLATFORM_LONG}" STREQUAL fx9860G)
generate_g1a(TARGET Copy3DEngine OUTPUT ${NAMEOFGAME}".g1a"
2024-10-27 23:52:11 +01:00
NAME "Illu3D" ICON assets-fx/icon.png)
2024-09-26 19:09:33 +02:00
else()
generate_g3a(TARGET Copy3DEngine OUTPUT ${NAMEOFGAME}".g3a"
2024-10-27 23:52:11 +01:00
NAME "Illu3D" ICONS assets-fx/icon.png assets-fx/icon.png)
2023-07-20 12:31:08 +02:00
endif()