Added library target in CmakeLists

This commit is contained in:
Valerio De Benedetto 2024-12-12 22:38:21 +01:00
parent 9b93660e81
commit a1705c0dff

View File

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