2022-01-24 03:28:16 +00:00
|
|
|
cmake_minimum_required(VERSION 3.10)
|
|
|
|
|
|
|
|
set(CNC_INCLUDEDIR ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
|
|
|
|
2022-01-25 18:13:04 +00:00
|
|
|
project(LaikaCNC 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 LaikaCNC
|
|
|
|
file(GLOB_RECURSE CNCSOURCE ${CMAKE_CURRENT_SOURCE_DIR}/src/**.c)
|
|
|
|
add_executable(LaikaCNC ${CNCSOURCE})
|
|
|
|
target_link_libraries(LaikaCNC PUBLIC LaikaLib)
|
|
|
|
|
|
|
|
# add the 'DEBUG' preprocessor definition if we're compiling as Debug
|
|
|
|
target_compile_definitions(LaikaCNC PUBLIC "$<$<CONFIG:Debug>:DEBUG>")
|
|
|
|
|
|
|
|
# add include directory
|
|
|
|
target_include_directories(LaikaCNC PUBLIC ${CNC_INCLUDEDIR})
|