cmake_minimum_required(VERSION 3.21)
project(twngame LANGUAGES C)

if(NOT CMAKE_BUILD_TYPE)
        set(CMAKE_BUILD_TYPE Debug)
endif()

add_subdirectory($ENV{TWNROOT} $ENV{TWNROOT}/build)

set(SOURCE_FILES
        game.c
        state.h
)

cmake_path(GET CMAKE_SOURCE_DIR STEM LAST_ONLY GAME_PROJECT_NAME)
use_townengine(${GAME_PROJECT_NAME} "${SOURCE_FILES}" ${CMAKE_CURRENT_SOURCE_DIR})
