You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a clean way to include it from other projects, using find_package(Modbus) or something similar, instead of hard-coding the paths? (I installed it using apt)
If yes, could this info be added to the README ?
The text was updated successfully, but these errors were encountered:
find_package(Modbus REQUIRED)
set (modbuspp_DIR "/usr/local/lib/modbuspp/cmake/" CACHE STRING "modbuspp cmake folder")
find_package(modbuspp REQUIRED)
add_executable(foo foo.cpp)
target_compile_options(foo PRIVATE)
target_include_directories(foo PRIVATE ${MODBUS_INCLUDE_DIR} ${MODBUSPP_INCLUDE_DIRS})
target_link_libraries(foo PUBLIC ${MODBUSPP_LIBRARIES})
add_test(
NAME foo
COMMAND foo ?
)
I think it would be nicer if the CMake file would automatically define the interface_directories and libraries to include, instead of having to apply those manually in your targets.
Hello, thanks for the repository!
Is there a clean way to include it from other projects, using
find_package(Modbus)
or something similar, instead of hard-coding the paths? (I installed it using apt)If yes, could this info be added to the README ?
The text was updated successfully, but these errors were encountered: