File: FindXkbFile.cmake

package info (click to toggle)
kcm-fcitx 0.5.6%2Bgit20221120-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 652 kB
  • sloc: cpp: 6,369; makefile: 12
file content (35 lines) | stat: -rw-r--r-- 1,131 bytes parent folder | download | duplicates (7)
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_INCLUDEDIR}
          PATH_SUFFIXES "X11/extensions")

find_library(XKBFILE_LIBRARIES
             NAMES xkbfile
             HINTS ${PC_LIBXKBFILE_LIBDIR})

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)