2022-01-24 03:28:16 +00:00
|
|
|
cmake_minimum_required(VERSION 3.10)
|
|
|
|
|
|
|
|
set(BOT_INCLUDEDIR ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
|
|
|
|
2022-01-25 18:13:04 +00:00
|
|
|
project(LaikaBot VERSION 1.0)
|
2022-01-24 03:28:16 +00:00
|
|
|
|
|
|
|
# Put CMake targets (ALL_BUILD/ZERO_CHECK) into a folder
|
|
|
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
|
|
|
|
|
|
|
# compile LaikaBot
|
|
|
|
file(GLOB_RECURSE BOTSOURCE ${CMAKE_CURRENT_SOURCE_DIR}/src/**.c)
|
2022-03-14 05:51:11 +00:00
|
|
|
file(GLOB_RECURSE BOTHEADERS ${CMAKE_CURRENT_SOURCE_DIR}/include/**.h)
|
|
|
|
add_executable(LaikaBot ${BOTSOURCE} ${BOTHEADERS})
|
2022-03-14 06:11:13 +00:00
|
|
|
set_property(TARGET LaikaBot PROPERTY C_STANDARD 11)
|
2022-03-14 05:53:32 +00:00
|
|
|
target_link_libraries(LaikaBot PUBLIC LaikaLib util)
|
2022-01-24 03:28:16 +00:00
|
|
|
|
|
|
|
# add the 'DEBUG' preprocessor definition if we're compiling as Debug
|
|
|
|
target_compile_definitions(LaikaBot PUBLIC "$<$<CONFIG:Debug>:DEBUG>")
|
|
|
|
|
|
|
|
# add include directory
|
|
|
|
target_include_directories(LaikaBot PUBLIC ${BOT_INCLUDEDIR})
|