24 lines
526 B
CMake
24 lines
526 B
CMake
cmake_minimum_required(VERSION 3.21)
|
|
|
|
project(template LANGUAGES C)
|
|
|
|
if(NOT CMAKE_BUILD_TYPE)
|
|
set(CMAKE_BUILD_TYPE Debug)
|
|
endif()
|
|
|
|
# add root townengine cmake file
|
|
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
|
|
add_subdirectory(../../ ../../../.build)
|
|
endif()
|
|
|
|
set(SOURCE_FILES
|
|
game.c game.h
|
|
)
|
|
|
|
add_executable(${PROJECT_NAME} ${SOURCE_FILES})
|
|
use_townengine(${PROJECT_NAME})
|
|
|
|
set_target_properties(${PROJECT_NAME} PROPERTIES
|
|
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
)
|