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( 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)