-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFindMosquittopp.cmake
34 lines (26 loc) · 1.1 KB
/
FindMosquittopp.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# - Find libmosquittopp
# Find the native libmosquitto includes and libraries
#
# MOSQUITTOPP_INCLUDE_DIR - where to find mosquitto.h, etc.
# MOSQUITTOPP_LIBRARIES - List of libraries when using libmosquitto.
# MOSQUITTOPP_FOUND - True if libmosquitto found.
if(MOSQUITTOPP_INCLUDE_DIR)
# Already in cache, be silent
set(MOSQUITTOPP_FIND_QUIETLY TRUE)
endif(MOSQUITTOPP_INCLUDE_DIR)
find_path(MOSQUITTOPP_INCLUDE_DIR mosquitto.h)
find_library(MOSQUITTOPP_LIBRARY NAMES libmosquittopp mosquittopp)
# Handle the QUIETLY and REQUIRED arguments and set MOSQUITTO_FOUND to TRUE if
# all listed variables are TRUE.
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
MOSQUITTOPP DEFAULT_MSG
MOSQUITTOPP_LIBRARY MOSQUITTOPP_INCLUDE_DIR)
if(MOSQUITTOPP_FOUND)
message(STATUS "libmosquittopp include dir: ${MOSQUITTOPP_INCLUDE_DIR}")
message(STATUS "libmosquittopp: ${MOSQUITTOPP_LIBRARY}")
set(MOSQUITTOPP_LIBRARIES ${MOSQUITTOPP_LIBRARY})
else(MOSQUITTOPP_FOUND)
set(MOSQUITTOPP_LIBRARIES)
endif(MOSQUITTOPP_FOUND)
mark_as_advanced(MOSQUITTOPP_INCLUDE_DIR MOSQUITTOPP_LIBRARY)