summaryrefslogtreecommitdiffstats
path: root/cmake/modules/FindMir.cmake
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2017-06-04 16:57:49 +0200
committermanuel <manuel@mausz.at>2017-06-04 16:57:49 +0200
commitf44ecaa4f27e7538ddcad66d40e543bffa2d2d86 (patch)
treed8de60fc7e17edeb6f0921726c038ee54b281445 /cmake/modules/FindMir.cmake
parentae08c8b7221bc965ac40d70e53fc8fcddb050c46 (diff)
downloadkodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.tar.gz
kodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.tar.bz2
kodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.zip
sync with upstream
Diffstat (limited to 'cmake/modules/FindMir.cmake')
-rw-r--r--cmake/modules/FindMir.cmake33
1 files changed, 33 insertions, 0 deletions
diff --git a/cmake/modules/FindMir.cmake b/cmake/modules/FindMir.cmake
new file mode 100644
index 0000000..47a441c
--- /dev/null
+++ b/cmake/modules/FindMir.cmake
@@ -0,0 +1,33 @@
1# FindMir
2# -------
3# Finds the Mir library
4#
5# This will will define the following variables::
6#
7# MIR_FOUND - the system has Mir
8# MIR_INCLUDE_DIRS - the Mir include directory
9# MIR_LIBRARIES - the Mir libraries
10# MIR_DEFINITIONS - the Mir definitions
11
12
13if(PKG_CONFIG_FOUND)
14 pkg_check_modules (PC_MIR mirclient>=0.26.2 QUIET)
15endif()
16
17find_path(MIR_INCLUDE_DIR NAMES mir_toolkit/mir_client_library.h
18 PATHS ${PC_MIR_INCLUDE_DIRS})
19
20find_library(MIR_LIBRARY NAMES mirclient
21 PATHS ${PC_MIR_LIBRARIES} ${PC_MIR_LIBRARY_DIRS})
22
23include (FindPackageHandleStandardArgs)
24find_package_handle_standard_args (MIR
25 REQUIRED_VARS MIR_LIBRARY MIR_INCLUDE_DIR)
26
27if (MIR_FOUND)
28 set(MIR_LIBRARIES ${MIR_LIBRARY})
29 set(MIR_INCLUDE_DIRS ${PC_MIR_INCLUDE_DIRS})
30 set(MIR_DEFINITIONS -DHAVE_MIR=1)
31endif()
32
33mark_as_advanced (MIR_LIBRARY MIR_INCLUDE_DIR)