Templates
Callbacks

Callbacks

{{ toolchains("") }}
 
cmake_minimum_required( VERSION {{ cmake_version }} )
project(
  {{ project_name }}
  VERSION {{ project_version }}
  {%if lang == "cpp"%}LANGUAGES CXX
  {%else if lang == "c"%}LANGUAGES C
  {%endif%}
)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_CXX_STANDARD {{ lang_version }})
include(cmake/CPM.cmake)
 
{{ sccache("") }}
{{ ccache("") }}
 
 
{{ packages("") }}
 
file(GLOB_RECURSE SOURCES RELATIVE ${CMAKE_SOURCE_DIR}
  "src/**.cpp"
  "src/**.c"
  "src/**/**.cpp"
  "src/**/**.c"
)
 
message("Sources: ${SOURCES}")
 
{{ flags("") }}
 
include_directories($CMAKE_SOURCE_DIR/{{ include_dir }})
set(HEADER_DIR $CMAKE_SOURCE_DIR/{{ include_dir }})
 
if(NOT DEFINED RELEASE)
  set(RELEASE 0)
endif()
 
add_executable({{project_name}} ${SOURCES})
 
{{ compile_modes("") }}
 
set(BUILD_DIR {{ build_dir }})
set_target_properties({{project_name}} PROPERTIES RUNTIME_OUTPUT_DIRECTORY {{build_dir}})
 
 
{{  targets("")  }}
install(TARGETS {{project_name}} DESTINATION bin)