Builder/CMakeLists.txt

42 lines
1.1 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/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/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/selectcross.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()