Add support for mqtt sensors

This commit is contained in:
Carl Philipp Klemm 2026-03-27 17:47:09 +01:00
parent d6c8d799e3
commit e3b6d5c3a6
7 changed files with 251 additions and 5 deletions

View file

@ -10,7 +10,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_compile_options(-Wall)
# Find Qt packages
find_package(Qt6 COMPONENTS Core Gui Widgets Network Multimedia SerialPort REQUIRED)
find_package(Qt6 COMPONENTS Core Gui Widgets Network Multimedia SerialPort Mqtt REQUIRED)
# Find dependencies using pkg-config
find_package(PkgConfig REQUIRED)
@ -25,7 +25,8 @@ set(CMAKE_AUTOUIC ON)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
# Create executable
add_executable(SHinterface)
add_executable(SHinterface
src/sensors/mqttsensorsource.h src/sensors/mqttsensorsource.cpp)
# Add sources to executable
target_sources(SHinterface
@ -159,6 +160,7 @@ target_link_libraries(SHinterface
Qt6::Network
Qt6::Multimedia
Qt6::SerialPort
Qt6::Mqtt
${PIPEWIRE_LIBRARIES}
${LIBNL3_LIBRARIES}
)