1 # - Try to find XKBCommon
2 # Once done, this will define
4 # XKBCOMMON_FOUND - System has XKBCommon
5 # XKBCOMMON_INCLUDE_DIRS - The XKBCommon include directories
6 # XKBCOMMON_LIBRARIES - The libraries needed to use XKBCommon
7 # XKBCOMMON_DEFINITIONS - Compiler switches required for using XKBCommon
9 find_package(PkgConfig)
10 pkg_check_modules(PC_XKBCOMMON QUIET xkbcommon)
11 set(XKBCOMMON_DEFINITIONS ${PC_XKBCOMMON_CFLAGS_OTHER})
13 find_path(XKBCOMMON_INCLUDE_DIR
14 NAMES xkbcommon/xkbcommon.h
15 HINTS ${PC_XKBCOMMON_INCLUDE_DIR} ${PC_XKBCOMMON_INCLUDE_DIRS}
18 find_library(XKBCOMMON_LIBRARY
20 HINTS ${PC_XKBCOMMON_LIBRARY} ${PC_XKBCOMMON_LIBRARY_DIRS}
23 set(XKBCOMMON_LIBRARIES ${XKBCOMMON_LIBRARY})
24 set(XKBCOMMON_LIBRARY_DIRS ${XKBCOMMON_LIBRARY_DIRS})
25 set(XKBCOMMON_INCLUDE_DIRS ${XKBCOMMON_INCLUDE_DIR})
27 include(FindPackageHandleStandardArgs)
28 find_package_handle_standard_args(XKBCommon DEFAULT_MSG
33 mark_as_advanced(XKBCOMMON_LIBRARY XKBCOMMON_INCLUDE_DIR)