File: FindMir.cmake

package info (click to toggle)
vulkan 1.0.39.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 13,916 kB
  • ctags: 21,039
  • sloc: cpp: 97,094; ansic: 39,645; xml: 5,274; python: 4,425; sh: 556; makefile: 21
file content (37 lines) | stat: -rw-r--r-- 923 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
36
37
# Try to find Mir on a Unix system
#
# This will define:
#
#   MIR_FOUND       - System has Mir
#   MIR_LIBRARIES   - Link these to use Mir
#   MIR_INCLUDE_DIR - Include directory for Mir
#   MIR_DEFINITIONS - Compiler switches required for using Mir

if (NOT WIN32)

  find_package (PkgConfig)
  pkg_check_modules (PKG_MIR QUIET mirclient)
  set(MIR_DEFINITIONS ${PKG_MIR_CFLAGS_OTHER})

  find_path(MIR_INCLUDE_DIR
      NAMES xkbcommon/xkbcommon.h
      HINTS ${PC_XKBCOMMON_INCLUDE_DIR} ${PC_XKBCOMMON_INCLUDE_DIRS}
  )

  find_library(MIR_LIBRARY
      NAMES mirclient
      HINTS ${PKG_MIR_LIBRARIES} ${MIR_LIBRARY_DIRS}
  )

  set (MIR_INCLUDE_DIR ${PKG_MIR_INCLUDE_DIRS})
  set (MIR_LIBRARIES   ${MIR_LIBRARY})

  include (FindPackageHandleStandardArgs)
  find_package_handle_standard_args (MIR DEFAULT_MSG
      MIR_LIBRARIES
      MIR_INCLUDE_DIR
  )

  mark_as_advanced (MIR_LIBRARIES MIR_INCLUDE_DIR)

endif ()