-
-
Notifications
You must be signed in to change notification settings - Fork 635
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ee098a4
commit fbb9d1c
Showing
3 changed files
with
44 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,53 @@ | ||
|
||
if(BUILDING_WITH_VCPKG) | ||
message(STATUS "Finding MOSQUITTO with vcpkg") | ||
find_package(mosquitto CONFIG REQUIRED) | ||
set(MOSQUITTO_FOUND ON) | ||
elseif(BUILDING_WITH_CONAN) | ||
message(STATUS "Finding MOSQUITTO with conan") | ||
find_package(mosquitto REQUIRED) | ||
set(MOSQUITTO_FOUND ON) | ||
set(MOSQUITTO_LIBS mosquitto::mosquitto) | ||
if(BUILDING_WITH_CONAN) | ||
message(STATUS "Finding MOSQUITTO with conan") | ||
find_package(mosquitto REQUIRED) | ||
set(MOSQUITTO_FOUND ON) | ||
else() | ||
message(STATUS "Finding MOSQUITTO without package managers") | ||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/") | ||
find_package(Mosquitto REQUIRED) | ||
set(MOSQUITTO_LIBS ${MOSQUITTO_LIBRARIES}) | ||
include_directories( ${MOSQUITTO_INCLUDE_DIR} ) | ||
message(STATUS "Finding MOSQUITTO without package managers") | ||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/") | ||
find_package(Mosquitto REQUIRED) | ||
endif() | ||
|
||
if(MOSQUITTO_FOUND) | ||
|
||
message(STATUS "[MOSQUITTO] found.") | ||
add_definitions(${QT_DEFINITIONS}) | ||
add_definitions(-DQT_PLUGIN) | ||
|
||
QT5_WRAP_UI ( UI_SRC datastream_mqtt.ui ) | ||
|
||
SET( SRC | ||
datastream_mqtt.h | ||
datastream_mqtt.cpp | ||
mqtt_dialog.h | ||
mqtt_dialog.cpp | ||
mqtt_client.h | ||
mqtt_client.cpp | ||
) | ||
|
||
add_library(DataStreamMQTT_Mosquitto SHARED ${SRC} ${UI_SRC} ) | ||
|
||
target_link_libraries(DataStreamMQTT_Mosquitto | ||
${Qt5Widgets_LIBRARIES} | ||
Qt5::Network | ||
Qt5::Svg | ||
${MOSQUITTO_LIBS} | ||
plotjuggler_base | ||
) | ||
|
||
install(TARGETS DataStreamMQTT_Mosquitto | ||
DESTINATION ${PJ_PLUGIN_INSTALL_DIRECTORY} ) | ||
message(STATUS "[MOSQUITTO] found.") | ||
add_definitions(${QT_DEFINITIONS}) | ||
add_definitions(-DQT_PLUGIN) | ||
|
||
QT5_WRAP_UI ( UI_SRC datastream_mqtt.ui ) | ||
|
||
SET( SRC | ||
datastream_mqtt.h | ||
datastream_mqtt.cpp | ||
mqtt_dialog.h | ||
mqtt_dialog.cpp | ||
mqtt_client.h | ||
mqtt_client.cpp | ||
) | ||
|
||
add_library(DataStreamMQTT_Mosquitto SHARED ${SRC} ${UI_SRC} ) | ||
|
||
target_link_libraries(DataStreamMQTT_Mosquitto | ||
${Qt5Widgets_LIBRARIES} | ||
Qt5::Network | ||
Qt5::Svg | ||
plotjuggler_base | ||
) | ||
|
||
if(BUILDING_WITH_CONAN) | ||
target_link_libraries(DataStreamMQTT_Mosquitto mosquitto::mosquitto) | ||
else() | ||
target_link_libraries(DataStreamMQTT_Mosquitto ${MOSQUITTO_LIBRARIES}) | ||
target_include_directories(DataStreamMQTT_Mosquitto | ||
PUBLIC ${MOSQUITTO_INCLUDE_DIR}) | ||
endif() | ||
|
||
install(TARGETS DataStreamMQTT_Mosquitto | ||
DESTINATION ${PJ_PLUGIN_INSTALL_DIRECTORY} ) | ||
|
||
else() | ||
message("[MOSQUITTO] not found. Skipping plugin DataStreamMQTT.") | ||
message("[MOSQUITTO] not found. Skipping plugin DataStreamMQTT.") | ||
endif() | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters