diff --git a/CMakeLists.txt b/CMakeLists.txt index e21f3aa..724966e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,4 +8,5 @@ include(projectheader) project_header(modbus-cpp) add_subdirectory(src) +add_subdirectory(tools) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt new file mode 100644 index 0000000..1e00337 --- /dev/null +++ b/tools/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 3.0) +project(modbus-cpp) +LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/submodules/cmake) + +# ============================================================================== +# = Include build information +include(projectheader) +project_header(modbus-cpp) + +add_subdirectory(modbus-master) +# add_subdirectory(modbus-slave) diff --git a/tools/README.md b/tools/README.md new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tools/README.md diff --git a/tools/modbus-master/CMakeLists.txt b/tools/modbus-master/CMakeLists.txt new file mode 100644 index 0000000..69d9684 --- /dev/null +++ b/tools/modbus-master/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 3.16) +LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/submodules/cmake) + +include(projectheader) +project_header(modbus-master) + +include(compiler) + +include_directories( + ${CMAKE_SOURCE_DIR}/include +) + +set(SRC_LIST +) + diff --git a/tools/modbus-slave/CMakeLists.txt b/tools/modbus-slave/CMakeLists.txt new file mode 100644 index 0000000..6fbcada --- /dev/null +++ b/tools/modbus-slave/CMakeLists.txt @@ -0,0 +1,30 @@ +cmake_minimum_required(VERSION 3.16) +LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/submodules/cmake) + +include(projectheader) +project_header(modbus-cpp) + +include(compiler) + +include_directories( + ${CMAKE_SOURCE_DIR}/include +) + +set(SRC_LIST + ${CMAKE_CURRENT_SOURCE_DIR}/modbusbase.h + ${CMAKE_CURRENT_SOURCE_DIR}/modbusbase.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/modbustcp.h + ${CMAKE_CURRENT_SOURCE_DIR}/modbustcp.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/modbusrtu.h + ${CMAKE_CURRENT_SOURCE_DIR}/modbusrtu.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/connectionconfig.h + ${CMAKE_CURRENT_SOURCE_DIR}/connectionconfig.cpp +) + +include(library) +add_libraries(PUBLIC +) + +include(installation) +install_component() +