-
Notifications
You must be signed in to change notification settings - Fork 11
/
CMakeLists.txt
74 lines (62 loc) · 1.3 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
cmake_minimum_required(VERSION 3.10)
project(grblHAL-sim C)
add_compile_definitions(F_CPU=16000000)
add_compile_definitions(INJECT_BLOCK_BUFFER_SIZE=256)
#add_compile_definitions(SQUARING_ENABLED=1)
include(src/grbl/CMakeLists.txt)
if (WIN32)
add_compile_definitions(PLATFORM_WINDOWS)
set(platform_SRC
src/platform_windows.h
src/platform_windows.c
)
set(platform_LIB
ws2_32
)
endif(WIN32)
if(UNIX)
add_compile_definitions(PLATFORM_LINUX)
set(platform_SRC
src/platform_linux.h
src/platform_linux.c
)
if(APPLE)
set(platform_LIB
pthread
)
else(APPLE)
set(platform_LIB
rt
pthread
)
endif(APPLE)
endif(UNIX)
add_executable(grblHAL_sim
src/main.c
src/simulator.c
src/driver.c
src/eeprom.c
src/grbl_eeprom_extensions.c
src/mcu.c
src/serial.c
src/grbl_interface.c
src/planner_inject_accessors.c
${platform_SRC}
)
target_link_libraries(grblHAL_sim PRIVATE
m
grbl
${platform_LIB}
)
add_executable(grblHAL_validator
src/eeprom.c
src/grbl_eeprom_extensions.c
src/validator.c
src/validator_driver.c
${platform_SRC}
)
target_link_libraries(grblHAL_validator PRIVATE
m
grbl
${platform_LIB}
)