cmake_minimum_required(VERSION 3.2) project(modbus) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") aux_source_directory(3rdparty/libmodbus DIRSRCS) include_directories(3rdparty/libmodbus include) set(SOURCE_FILES tests/main.cpp src/ConnectionConfig.h src/IModbusAdapter.h src/ModbusAdapter.h src/ModbusAdapter.cpp ) add_executable(main ${SOURCE_FILES} ${DIRSRCS} )