Adoranda/CMakeLists.txt

96 lines
2.7 KiB
CMake
Raw Permalink Normal View History

2021-07-29 18:33:22 +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(MyAddin)
include(GenerateG1A)
include(GenerateG3A)
include(Fxconv)
include_directories(include)
find_package(Gint 2.1 REQUIRED)
fxconv_declare_converters(assets-cg/converters.py)
add_custom_command(
OUTPUT "${CMAKE_CURRENT_LIST_DIR}/assets-cg/maps/testCarte.json"
"${CMAKE_CURRENT_LIST_DIR}/assets-cg/maps/1.json"
"${CMAKE_CURRENT_LIST_DIR}/assets-cg/maps/2.json"
2021-08-27 22:50:00 +02:00
"${CMAKE_CURRENT_LIST_DIR}/assets-cg/maps/inside/1.json"
"${CMAKE_CURRENT_LIST_DIR}/assets-cg/maps/inside/2.json"
COMMENT "Convert tmx map to json"
COMMAND tiled --export-tileset json tileset.tsx tileset.json
2022-01-22 17:12:24 +01:00
COMMAND tiled --export-tileset json inside/tileset_in.tsx inside/tileset_in.json
2021-12-23 18:37:48 +01:00
COMMAND find | grep .*.tmx | sed 's/.tmx//g' | xargs -l bash -c 'tiled --export-map json $$0.tmx $$0.json'
2021-07-29 18:33:22 +02:00
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/assets-cg/maps/
2021-08-27 22:50:00 +02:00
DEPENDS assets-cg/maps/testCarte.tmx
2022-01-18 23:43:48 +01:00
assets-cg/maps/1.tmx
2022-05-26 17:06:17 +02:00
assets-cg/maps/2.tmx
2021-08-27 22:50:00 +02:00
assets-cg/tileset.png
assets-cg/maps/tileset.tsx
2022-01-22 17:12:24 +01:00
assets-cg/maps/inside/tileset_in.tsx
2021-08-27 22:50:00 +02:00
assets-cg/converters.py
assets-cg/maps/inside/1.tmx
2022-01-22 17:12:24 +01:00
assets-cg/maps/inside/2.tmx)
2021-08-25 00:29:31 +02:00
2021-07-29 18:33:22 +02:00
set(SOURCES
src/main.c
src/talkable.c
2021-08-25 01:01:43 +02:00
src/vec2.c
2021-07-29 18:33:22 +02:00
src/game.c
src/engine.c
2021-08-25 01:01:43 +02:00
src/camera.c
src/map.c
2021-08-25 01:01:43 +02:00
src/player.c
src/util.c
2021-08-25 01:01:43 +02:00
src/animation.c
2022-01-23 00:53:07 +01:00
src/battle.c
src/stats.c
2022-01-24 15:15:12 +01:00
src/capacite.c
2022-01-30 01:09:58 +01:00
src/monster.c
2022-04-02 01:57:54 +02:00
src/event.c
src/inventory.c
2022-04-22 00:32:31 +02:00
src/item.c
2022-05-03 00:40:09 +02:00
src/type.c
src/draw_util.c
2021-07-29 18:33:22 +02:00
)
set(ASSETS_cg
assets-cg/tileset.png
2022-05-26 17:06:17 +02:00
assets-cg/inventory.png
2022-02-18 15:44:41 +01:00
assets-cg/categories.png
assets-cg/contours.png
2022-02-15 02:15:08 +01:00
assets-cg/dialogue.png
assets-cg/capacite.png
assets-cg/battle_ui.png
assets-cg/battle_env_1.png
2022-01-22 17:12:24 +01:00
assets-cg/maps/inside/tileset_in.png
assets-cg/maps/testCarte.json
2022-01-18 23:43:48 +01:00
assets-cg/maps/1.json
2022-05-26 17:06:17 +02:00
assets-cg/maps/2.json
2021-08-27 22:50:00 +02:00
assets-cg/maps/inside/1.json
assets-cg/maps/inside/2.json
2021-07-29 18:33:22 +02:00
assets-cg/spritesheet.png
2021-12-23 19:21:27 +01:00
assets-cg/uf8x9
2022-01-24 15:15:12 +01:00
assets-cg/capacites/capacites.txt
2022-01-30 01:09:58 +01:00
assets-cg/monsters/test.png
2022-02-19 01:21:38 +01:00
assets-cg/monsters/test2.png
assets-cg/monsters/monsters.txt
2022-03-23 01:16:24 +01:00
assets-cg/player_moves.txt
assets-cg/items/items.txt
assets-cg/items/item.png
assets-cg/items/item2.png
2022-05-03 00:40:09 +02:00
assets-cg/table_type.csv
2021-07-29 18:33:22 +02:00
)
fxconv_declare_assets(${ASSETS} ${ASSETS_fx} ${ASSETS_cg} WITH_METADATA)
add_executable(myaddin ${SOURCES} ${ASSETS} ${ASSETS_${FXSDK_PLATFORM}})
target_compile_options(myaddin PRIVATE -Wall -Wextra -Os)
target_link_libraries(myaddin Gint::Gint)
target_link_options(myaddin PRIVATE -Wl,-Map=map)
2021-07-29 18:33:22 +02:00
if("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50)
2021-12-23 18:37:48 +01:00
generate_g3a(TARGET myaddin OUTPUT "Adoranda.g3a"
NAME "Adoranda" ICONS assets-cg/icon-uns.png assets-cg/icon-sel.png)
2021-07-29 18:33:22 +02:00
endif()