summaryrefslogtreecommitdiff
path: root/CMake/FindDRM.cmake
blob: 3de35bf1eac78917f1060cf04ef4c20555483a26 (plain)
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 X library and include path.
# Once done this will define
#
# DRM_FOUND
# DRM_INCLUDE_PATH
# DRM_LIBRARY
# 

FIND_PATH(DRM_INCLUDE_PATH drm.h
  ~/include/libdrm/
  /usr/include/libdrm/
  /usr/local/include/libdrm/
  /sw/include/libdrm/
  /opt/local/include/libdrm/
  DOC "The directory where drm.h resides")
FIND_LIBRARY(DRM_LIBRARY
  NAMES DRM drm
  PATHS
  ~/lib/
  /usr/lib64
  /usr/lib
  /usr/local/lib64
  /usr/local/lib
  /sw/lib
  /opt/local/lib
  DOC "The DRM library")

IF(DRM_INCLUDE_PATH)
  INCLUDE_DIRECTORIES(${DRM_INCLUDE_PATH})
  SET(DRM_FOUND 1 CACHE STRING "Set to 1 if DRM is found, 0 otherwise")
ELSE(DRM_INCLUDE_PATH)
  SET(DRM_FOUND 0 CACHE STRING "Set to 1 if DRM is found, 0 otherwise")
ENDIF(DRM_INCLUDE_PATH)

MARK_AS_ADVANCED(DRM_FOUND)