removed manual library handling in stm32 cmake example

This commit is contained in:
Donghoon Park 2024-12-14 12:32:18 +09:00
parent f9dfe53a67
commit 18a90a0a3e

View File

@ -55,17 +55,11 @@ FetchContent_MakeAvailable(wizchip)
FetchContent_Declare(
nanomodbus
GIT_REPOSITORY https://github.com/debevv/nanoMODBUS
GIT_TAG v1.18.1
GIT_TAG master
GIT_SHALLOW TRUE
)
FetchContent_GetProperties(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})
FetchContent_MakeAvailable(nanomodbus)
set(TARGET_NAMES modbus_rtu modbus_tcp)