Add Mosquitto and Mosquittopp library detection

This commit is contained in:
Isaac Connor 2021-12-22 16:15:48 -05:00
parent 81048b6191
commit 3fd5e855d1
1 changed files with 21 additions and 1 deletions

View File

@ -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}")