diff --git a/CMakeLists.txt b/CMakeLists.txt index 3b789e4c8..1cd4d9146 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -429,8 +429,28 @@ if(NOT ZM_NO_PRCE) endif() endif() +if(NOT ZM_NO_MQTT) + find_package(Mosquitto) + if(MOSQUITTO_FOUND) + include_directories(${MOSQUITTO_INCLUDE_DIRS}) + list(APPEND ZM_BIN_LIBS "${MOSQUITTO_LIBRARIES}") + set(optlibsfound "${optlibsfound} Mosquitto") + else() + set(optlibsnotfound "${optlibsnotfound} Mosquitto") + endif (MOSQUITTO_FOUND) + + find_package(Mosquittopp) + if(MOSQUITTOPP_FOUND) + include_directories(${MOSQUITTOPP_INCLUDE_DIRS}) + list(APPEND ZM_BIN_LIBS "${MOSQUITTOPP_LIBRARIES}") + set(optlibsfound "${optlibsfound} Mosquittopp") + else() + set(optlibsnotfound "${optlibsnotfound} Mosquittopp") + endif (MOSQUITTOPP_FOUND) +endif() + # mysqlclient (using find_library and find_path) -find_library(MYSQLCLIENT_LIBRARIES mysqlclient PATH_SUFFIXES mysql) + find_library(MYSQLCLIENT_LIBRARIES mysqlclient PATH_SUFFIXES mysql) if(MYSQLCLIENT_LIBRARIES) set(HAVE_LIBMYSQLCLIENT 1) list(APPEND ZM_BIN_LIBS "${MYSQLCLIENT_LIBRARIES}")