removed manual library handling in stm32 cmake example
This commit is contained in:
parent
f9dfe53a67
commit
18a90a0a3e
@ -55,17 +55,11 @@ FetchContent_MakeAvailable(wizchip)
|
|||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
nanomodbus
|
nanomodbus
|
||||||
GIT_REPOSITORY https://github.com/debevv/nanoMODBUS
|
GIT_REPOSITORY https://github.com/debevv/nanoMODBUS
|
||||||
GIT_TAG v1.18.1
|
GIT_TAG master
|
||||||
GIT_SHALLOW TRUE
|
GIT_SHALLOW TRUE
|
||||||
)
|
)
|
||||||
|
|
||||||
FetchContent_GetProperties(nanomodbus)
|
FetchContent_MakeAvailable(nanomodbus)
|
||||||
if (NOT nanomodbus_POPULATED)
|
|
||||||
FetchContent_Populate(nanomodbus)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
add_library(nanomodbus ${nanomodbus_SOURCE_DIR}/nanomodbus.c)
|
|
||||||
target_include_directories(nanomodbus PUBLIC ${nanomodbus_SOURCE_DIR})
|
|
||||||
|
|
||||||
set(TARGET_NAMES modbus_rtu modbus_tcp)
|
set(TARGET_NAMES modbus_rtu modbus_tcp)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user