From 18a90a0a3eafd46506434cfed3a73735c1c9cb69 Mon Sep 17 00:00:00 2001 From: Donghoon Park Date: Sat, 14 Dec 2024 12:32:18 +0900 Subject: [PATCH] removed manual library handling in stm32 cmake example --- examples/stm32/CMakeLists.txt | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/examples/stm32/CMakeLists.txt b/examples/stm32/CMakeLists.txt index 856641e..1478a00 100644 --- a/examples/stm32/CMakeLists.txt +++ b/examples/stm32/CMakeLists.txt @@ -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)