File: FindXkbFile.cmake

package info (click to toggle)
fcitx 1%3A4.2.9.9-2.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 19,800 kB
  • sloc: ansic: 134,151; cpp: 7,280; sh: 2,778; python: 800; xml: 345; makefile: 42
file content (35 lines) | stat: -rw-r--r-- 1,139 bytes parent folder | download | duplicates (8)
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
35
# - Try to find the XKBFILE libraries
# Once done this will define
#
#  XKBFILE_FOUND - system has XKBFILE
#  XKBFILE_INCLUDE_DIR - the XKBFILE include directory
#  XKBFILE_LIBRARIES - XKBFILE library
#
# Copyright (c) 2012 CSSlayer <wengxt@gmail.com>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.

if(XKBFILE_INCLUDE_DIR AND XKBFILE_LIBRARIES)
    # Already in cache, be silent
    set(XKBFILE_FIND_QUIETLY TRUE)
endif(XKBFILE_INCLUDE_DIR AND XKBFILE_LIBRARIES)

find_package(PkgConfig)
pkg_check_modules(PC_LIBXKBFILE xkbfile)

find_path(XKBFILE_MAIN_INCLUDE_DIR
          NAMES XKBfile.h
          HINTS ${PC_LIBXKBFILE_INCLUDE_DIRS}
          PATH_SUFFIXES "X11/extensions")

find_library(XKBFILE_LIBRARIES
             NAMES xkbfile
             HINTS ${PC_LIBXKBFILE_LIBRARY_DIRS})

set(XKBFILE_INCLUDE_DIR "${XKBFILE_MAIN_INCLUDE_DIR}")

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(XkbFile  DEFAULT_MSG  XKBFILE_LIBRARIES XKBFILE_MAIN_INCLUDE_DIR)

mark_as_advanced(XKBFILE_INCLUDE_DIR XKBFILE_LIBRARIES)