diff --git a/CMakeLists.txt b/CMakeLists.txt index 829350170..83f470076 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -325,6 +325,7 @@ option(ENABLE_WS281XPWM "Enable the WS281x-PWM device" ${DEFAULT_WS281XPWM} ) message(STATUS "ENABLE_WS281XPWM = ${ENABLE_WS281XPWM}") option(ENABLE_BONJOUR "Enable the network discovery service" ${DEFAULT_BONJOUR} ) +message(STATUS "ENABLE_BONJOUR = ${ENABLE_BONJOUR}") option(ENABLE_MF "Enable Windows Media Foundation grabber" ${DEFAULT_MF}) message(STATUS "ENABLE_MF = ${ENABLE_MF}") diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake index daa4e378f..aeb63a752 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake @@ -548,6 +548,30 @@ macro(DeployWindows TARGET) ) endif() + # Copy MQTT Libs + if (ENABLE_MQTT) + set (MQTT_TARGET_LIB_FOLDER ${LIBRARY_OUTPUT_PATH}/${CMAKE_BUILD_TYPE}) + message(${MQTT_TARGET_LIB_FOLDER}) + find_file(MQTT_DLL + NAMES "qmqtt.dll" + PATHS "${MQTT_TARGET_LIB_FOLDER}" + NO_DEFAULT_PATH + REQUIRED + ) + message(${MQTT_DLL}) + if(NOT CMAKE_GITHUB_ACTION) + get_filename_component(MQTT_RUNTIME_TARGET ${TARGET_FILE} DIRECTORY) + execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${MQTT_DLL} ${MQTT_RUNTIME_TARGET}) + endif() + + install( + FILES ${MQTT_DLL} + DESTINATION "bin" + COMPONENT "HyperHDR" + ) + endif() + + # Create a qt.conf file in 'bin' to override hard-coded search paths in Qt plugins file(WRITE "${CMAKE_BINARY_DIR}/qt.conf" "[Paths]\nPlugins=../lib/\n") install( diff --git a/dependencies/CMakeLists.txt b/dependencies/CMakeLists.txt index 5b466e2ad..462480a26 100644 --- a/dependencies/CMakeLists.txt +++ b/dependencies/CMakeLists.txt @@ -146,7 +146,10 @@ if ( ENABLE_MQTT ) string(REPLACE "Qt5" "Qt${Qt_VERSION}" FILE_CONTENTS "${FILE_CONTENTS}") file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/external/qmqtt/CMakeLists.txt" "${FILE_CONTENTS}") - set(qmqtt_SHARED OFF) - set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) + if (NOT WIN32) + set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) + set(qmqtt_SHARED OFF) + endif() + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/external/qmqtt) ENDIF()