summaryrefslogtreecommitdiffstats
path: root/project/cmake/modules/FindX.cmake
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2016-03-08 21:02:53 +0100
committermanuel <manuel@mausz.at>2016-03-08 21:02:53 +0100
commit9fc8b732737f139d3e466510d75668ab45578960 (patch)
tree76db9bf5cb8cc869be908a5ed3d6f4cca3e3608a /project/cmake/modules/FindX.cmake
parentb75e2659df11c23aa921d2eed83c23adc282ed27 (diff)
downloadkodi-pvr-build-9fc8b732737f139d3e466510d75668ab45578960.tar.gz
kodi-pvr-build-9fc8b732737f139d3e466510d75668ab45578960.tar.bz2
kodi-pvr-build-9fc8b732737f139d3e466510d75668ab45578960.zip
sync with upstream
Diffstat (limited to 'project/cmake/modules/FindX.cmake')
-rw-r--r--project/cmake/modules/FindX.cmake21
1 files changed, 21 insertions, 0 deletions
diff --git a/project/cmake/modules/FindX.cmake b/project/cmake/modules/FindX.cmake
new file mode 100644
index 0000000..d9ab5bc
--- /dev/null
+++ b/project/cmake/modules/FindX.cmake
@@ -0,0 +1,21 @@
1# - Try to find X11
2# Once done this will define
3#
4# X11_FOUND - system has X11
5# X11_INCLUDE_DIRS - the X11 include directory
6# X11_LIBRARIES - The X11 libraries
7
8if(PKG_CONFIG_FOUND)
9 pkg_check_modules (X x11 xext libdrm egl)
10 list(APPEND X_INCLUDE_DIRS /usr/include)
11else()
12 find_path(X_INCLUDE_DIRS X11/Xlib.h)
13 find_library(X_LIBRARIES X11)
14endif()
15
16include(FindPackageHandleStandardArgs)
17find_package_handle_standard_args(X DEFAULT_MSG X_INCLUDE_DIRS X_LIBRARIES)
18
19list(APPEND X_DEFINITIONS -DHAVE_X11=1)
20
21mark_as_advanced(X_INCLUDE_DIRS X_LIBRARIES X_DEFINITIONS)