Builder/CMakeLists.txt

92 lines
2.9 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(builder)
include(GenerateG1A)
include(Fxconv)
find_package(Gint 2.1 REQUIRED)
set(SOURCES
src/main.c
# ...
)
set(ASSETS_fx
assets-fx/title.png
assets-fx/microfont.png
assets-fx/tiles/blocks/soil.png
assets-fx/tiles/blocks/grass.png
assets-fx/tiles/blocks/stone.png
assets-fx/tiles/blocks/coal.png
assets-fx/tiles/blocks/steel.png
assets-fx/tiles/blocks/wood.png
assets-fx/tiles/blocks/apple.png
assets-fx/tiles/blocks/barrel.png
assets-fx/tiles/blocks/bed.png
assets-fx/tiles/blocks/chain.png
assets-fx/tiles/blocks/cherry.png
assets-fx/tiles/blocks/choco.png
assets-fx/tiles/blocks/cotton.png
assets-fx/tiles/blocks/fire.png
assets-fx/tiles/blocks/furnace.png
assets-fx/tiles/blocks/granit.png
assets-fx/tiles/blocks/ingot.png
assets-fx/tiles/blocks/lantern.png
assets-fx/tiles/blocks/leaves.png
assets-fx/tiles/blocks/orange.png
assets-fx/tiles/blocks/pear.png
assets-fx/tiles/blocks/pumpkin.png
assets-fx/tiles/blocks/starston.png
assets-fx/tiles/blocks/water1.png
assets-fx/tiles/blocks/water2.png
assets-fx/tiles/blocks/wheat.png
assets-fx/tiles/blocks/woodplks.png
assets-fx/tiles/blocks/woodstep1.png
assets-fx/tiles/blocks/woodstep2.png
assets-fx/player/skin1/player0.png
assets-fx/player/skin1/player1.png
assets-fx/player/skin1/player2.png
assets-fx/player/skin1/player3.png
assets-fx/tools/pickaxe.png
assets-fx/tools/axe.png
assets-fx/tools/sword.png
assets-fx/tools/shovel.png
assets-fx/tools/hoe.png
assets-fx/tools/selectcross.png
assets-fx/ui_icons/invnormal.png
assets-fx/ui_icons/invselected.png
assets-fx/ui_icons/craftselect.png
assets-fx/ui_icons/arrow1.png
assets-fx/ui_icons/arrow2.png
assets-fx/tiles/overlays/block_break1.png
assets-fx/tiles/overlays/block_break2.png
assets-fx/tiles/overlays/block_break3.png
assets-fx/tiles/overlays/block_break4.png
assets-fx/tiles/overlays/smoke1.png
assets-fx/tiles/overlays/smoke2.png
assets-fx/living/animals/chicken.png
assets-fx/living/animals/cow.png
assets-fx/living/animals/horse.png
assets-fx/living/animals/pig.png
assets-fx/living/animals/sheep.png
assets-fx/living/ennemies/badbird1.png
assets-fx/living/ennemies/badbird2.png
assets-fx/living/ennemies/caterp1.png
assets-fx/living/ennemies/caterp2.png
assets-fx/living/ennemies/gloup1.png
assets-fx/living/ennemies/gloup2.png
assets-fx/living/ennemies/zombie1.png
assets-fx/living/ennemies/zombie2.png
# ...
)
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)
if("${FXSDK_PLATFORM_LONG}" STREQUAL fx9860G)
generate_g1a(TARGET myaddin OUTPUT "Builder.g1a"
NAME "Builder" ICON assets-fx/icon.png)
endif()