# - Try to find UIGadget # Once done, this will define # # UIGadget_FOUND - system has libui-gadget # UIGadget_INCLUDE_DIRS - the libui-gadget include directories # UIGadget_LIBRARIES - link these to use libui-gadget include(LibFindMacros) # Use pkg-config to get hints about paths libfind_pkg_check_modules(UIGadget_PKGCONF ui-gadget-1) # Include dir find_path(UIGadget_INCLUDE_DIRS NAMES ui-gadget.h PATHS ${UIGadget_PKGCONF_INCLUDE_DIRS} PATH_SUFFIXES ui-gadget-1 ) # Finally the library itself find_library(UIGadget_LIBRARY NAMES ui-gadget-1 PATHS ${UIGadget_PKGCONF_LIBRARY_DIRS} ) # Set the include dir variables and the libraries and let libfind_process do the rest. # NOTE: Singular variables for this library, plural for libraries this this lib depends on. set(UIGadget_PROCESS_INCLUDES UIGadget_INCLUDE_DIRS) set(UIGadget_PROCESS_LIBS UIGadget_LIBRARY) libfind_process(UIGadget)