From a1705c0dff8e376c3ff45c73330bb3f1dbae2c18 Mon Sep 17 00:00:00 2001 From: Valerio De Benedetto Date: Thu, 12 Dec 2024 22:38:21 +0100 Subject: [PATCH] Added library target in CmakeLists --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index b2c7ce9..c0bd632 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,9 @@ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -g0") include_directories(tests examples/linux .) +# Define BUILD_SHARED_LIBS=ON to build a dynamic library instead +add_library(nanomodbus nanomodbus.c) + add_executable(nanomodbus_tests nanomodbus.c tests/nanomodbus_tests.c) target_link_libraries(nanomodbus_tests pthread)