-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFindMosquitto.cmake
32 lines (26 loc) · 961 Bytes
/
FindMosquitto.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
# Find the native libmosquitto includes and libraries
#
# Mosquitto_INCLUDE_DIR - where to find mosquitto.h, etc.
# Mosquitto_LIBRARIES - List of libraries when using libmosquitto.
# Mosquitto_FOUND - True if libmosquitto found.
# Mosquitto_FIND_QUIETLY - True if libmosquitto had been already found.
if(Mosquitto_FOUND)
set(Mosquitto_FIND_QUIETLY TRUE)
endif()
find_path(Mosquitto_INCLUDE_DIR mosquitto.h)
find_library(Mosquitto_LIBRARY NAMES libmosquitto mosquitto)
find_library(Mosquitto_PP_LIBRARY NAMES libmosquittopp mosquittopp)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
Mosquitto
DEFAULT_MSG
Mosquitto_LIBRARY Mosquitto_PP_LIBRARY Mosquitto_INCLUDE_DIR)
if(Mosquitto_FOUND)
set(Mosquitto_LIBRARIES ${Mosquitto_LIBRARY} ${Mosquitto_PP_LIBRARY})
else()
set(Mosquitto_LIBRARIES)
endif()
mark_as_advanced(
Mosquitto_INCLUDE_DIR
Mosquitto_LIBRARY
Mosquitto_PP_LIBRARY)