-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathCMakeLists.txt
54 lines (41 loc) · 1.85 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
# Create interface library for MicroTBX-Modbus sources.
add_library(microtbx-modbus INTERFACE)
target_sources(microtbx-modbus INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/source/tbxmb_uart.c"
"${CMAKE_CURRENT_LIST_DIR}/source/tbxmb_rtu.c"
"${CMAKE_CURRENT_LIST_DIR}/source/tbxmb_event.c"
"${CMAKE_CURRENT_LIST_DIR}/source/tbxmb_server.c"
"${CMAKE_CURRENT_LIST_DIR}/source/tbxmb_client.c"
)
target_include_directories(microtbx-modbus INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/source"
)
# Create interface library for MicroTBX-Modbus OSAL superloop sources.
add_library(microtbx-modbus-osal-superloop INTERFACE)
target_sources(microtbx-modbus-osal-superloop INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/source/osal/tbxmb_superloop.c"
)
# Create interface library for MicroTBX-Modbus OSAL FreeRTOS sources.
add_library(microtbx-modbus-osal-freertos INTERFACE)
target_sources(microtbx-modbus-osal-freertos INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/source/osal/tbxmb_freertos.c"
)
# Create interface library for C++ extra sources.
add_library(microtbx-modbus-extra-cpp INTERFACE)
target_sources(microtbx-modbus-extra-cpp INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/source/extra/cplusplus/tbxmbserver.cpp"
"${CMAKE_CURRENT_LIST_DIR}/source/extra/cplusplus/tbxmbclient.cpp"
"${CMAKE_CURRENT_LIST_DIR}/source/extra/cplusplus/tbxmbport.cpp"
"${CMAKE_CURRENT_LIST_DIR}/source/extra/cplusplus/tbxmbevent.cpp"
)
target_include_directories(microtbx-modbus-extra-cpp INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/source/extra/cplusplus"
)
# Create interface library for the template. Only used for MISRA check.
add_library(microtbx-modbus-template INTERFACE)
target_include_directories(microtbx-modbus-template INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/source/template"
)
target_sources(microtbx-modbus-template INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/source/template/tbxmb_port.c"
)