mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
cmake: fix cmake build for FreeModBus
fix cmake build for FreeModBus:
1. nuttx-apps/modbus/mb.c:50:12: fatal error: mbrtu.h: No such file or directory
50 | # include "mbrtu.h"
2. nuttx-apps/modbus/functions/mbutils.c:41:10: fatal error: port.h: No such file or directory
41 | #include "port.h"
3. various "undefined reference to" errors
Signed-off-by: raiden00pl <raiden00@railab.me>
This commit is contained in:
parent
9e2775de98
commit
e336ebad5e
1 changed files with 9 additions and 4 deletions
|
|
@ -75,22 +75,27 @@ if(CONFIG_MODBUS)
|
|||
# rtu/Make.defs
|
||||
|
||||
if(CONFIG_MB_RTU_ENABLED OR CONFIG_MB_RTU_MASTER)
|
||||
list(APPEND rtu/mbcrc.c)
|
||||
list(APPEND CSRCS rtu/mbcrc.c)
|
||||
if(CONFIG_MB_RTU_ENABLED)
|
||||
list(APPEND rtu/mbrtu.c)
|
||||
list(APPEND CSRCS rtu/mbrtu.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_MB_RTU_MASTER)
|
||||
list(APPEND rtu/mbrtu_m.c)
|
||||
list(APPEND CSRCS rtu/mbrtu_m.c)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# tcp/Make.defs
|
||||
|
||||
if(CONFIG_MB_TCP_ENABLED)
|
||||
list(APPEND tcp/mbtcp.c)
|
||||
list(APPEND CSRCS tcp/mbtcp.c)
|
||||
endif()
|
||||
|
||||
# include private headers
|
||||
|
||||
target_include_directories(apps PRIVATE nuttx)
|
||||
target_include_directories(apps PRIVATE rtu)
|
||||
|
||||
target_sources(apps PRIVATE ${CSRCS})
|
||||
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue