create /apps/temapltes/ structure, clean up cmake files to use directory name for binary name directly

This commit is contained in:
veclavtalica
2025-02-01 13:47:17 +03:00
parent 24e8dc052d
commit aeabb17f86
9 changed files with 102 additions and 6 deletions

View File

@@ -0,0 +1,16 @@
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})