Skip to content

Instantly share code, notes, and snippets.

@stefanofiorentino
Created March 6, 2020 10:28
Show Gist options
  • Save stefanofiorentino/984c731e6a1f96bad7e5131f5135bcaa to your computer and use it in GitHub Desktop.
Save stefanofiorentino/984c731e6a1f96bad7e5131f5135bcaa to your computer and use it in GitHub Desktop.
# - Find libmosquittopp
# Find the native libmosquittopp includes and libraries
#
# MOSQUITTOPP_INCLUDE_DIR - where to find mosquitto.h, etc.
# MOSQUITTOPP_LIBRARIES - List of libraries when using libmosquittopp.
# MOSQUITTOPP_FOUND - True if libmosquittopp found.
if (NOT MOSQUITTOPP_INCLUDE_DIR)
find_path(MOSQUITTOPP_INCLUDE_DIR mosquitto.h)
endif()
if (NOT MOSQUITTOPP_LIBRARY)
find_library(
MOSQUITTOPP_LIBRARY
NAMES mosquittopp)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
MOSQUITTOPP DEFAULT_MSG
MOSQUITTOPP_LIBRARY MOSQUITTOPP_INCLUDE_DIR)
message(STATUS "libmosquittopp include dir: ${MOSQUITTOPP_INCLUDE_DIR}")
message(STATUS "libmosquittopp: ${MOSQUITTOPP_LIBRARY}")
set(MOSQUITTOPP_LIBRARIES ${MOSQUITTOPP_LIBRARY})
mark_as_advanced(MOSQUITTOPP_INCLUDE_DIR MOSQUITTOPP_LIBRARY)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment