Nooncraft/CMakeLists.txt

35 lines
976 B
CMake
Raw Permalink Normal View History

2022-07-16 13:15:34 +02:00
cmake_minimum_required(VERSION 3.15)
2022-07-16 23:02:04 +02:00
project(Nooncraft LANGUAGES CXX)
2022-07-16 13:15:34 +02:00
include(GenerateG3A)
include(Fxconv)
find_package(Gint 2.8 REQUIRED)
2022-07-16 23:44:58 +02:00
find_package(LibProf 2.1 REQUIRED)
2022-07-16 13:15:34 +02:00
set(SOURCES
2022-07-16 23:02:04 +02:00
src/block.cpp
src/camera.cpp
src/game.cpp
2022-07-17 16:23:23 +02:00
src/item.cpp
2022-07-16 23:02:04 +02:00
src/main.cpp
src/render.cpp
src/world.cpp)
2022-07-16 13:15:34 +02:00
set(ASSETS
2022-07-16 23:02:04 +02:00
assets-cg/font_nooncraft.png
2022-07-17 16:23:23 +02:00
assets-cg/blockinfo.yaml
assets-cg/iteminfo.yaml)
2022-07-16 13:15:34 +02:00
fxconv_declare_assets(${ASSETS} WITH_METADATA)
2022-07-16 23:02:04 +02:00
fxconv_declare_converters(converters.py)
2022-07-16 13:15:34 +02:00
add_executable(addin ${SOURCES} ${ASSETS})
2022-07-16 23:02:04 +02:00
target_compile_options(addin PRIVATE -Wall -Wextra -Wno-narrowing -Os -std=c++20)
2022-07-17 02:22:21 +02:00
target_link_libraries(addin LibProf::LibProf Gint::Gint -lnum -lsupc++)
2022-07-16 13:15:34 +02:00
if("${FXSDK_PLATFORM_LONG}" STREQUAL fx9860G)
message(FATAL_ERROR "This game is not supported on fx-9860G!")
elseif("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50)
generate_g3a(TARGET addin OUTPUT "NoonCraf.g3a"
NAME "NoonCraft" ICONS assets-cg/icon-uns.png assets-cg/icon-sel.png)
endif()