summaryrefslogtreecommitdiff
path: root/CMake/FindMesaSrc.cmake
blob: 978cb4eba43d7058bf99b5328aa059b02c890c71 (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
#
# Try to find mesa source code
# Once done this will define
#
# MESA_SOURCE_FOUND
# MESA_SOURCE_INCLUDES
#

# Find mesa source code.
FIND_PATH(MESA_SOURCE_PREFIX src/mesa/main/texobj.c
  $ENV{MESA_SOURCE_DIR}
  ${MAKE_CURRENT_SOURCE_DIR}/../mesa
  ~/mesa
  DOC "The mesa source directory which is needed for cl_khr_gl_sharing.")

IF(MESA_SOURCE_PREFIX)
SET(MESA_SOURCE_INCLUDES ${MESA_SOURCE_PREFIX}/src/mesa
                         ${MESA_SOURCE_PREFIX}/include
                         ${MESA_SOURCE_PREFIX}/src/mapi
                         ${MESA_SOURCE_PREFIX}/src/mesa/drivers/dri/i965/
                         ${MESA_SOURCE_PREFIX}/src/mesa/drivers/dri/i915/
                         ${MESA_SOURCE_PREFIX}/src/mesa/drivers/dri/common/)
SET(MESA_SOURCE_FOUND 1 CACHE STRING "Set to 1 if mesa source code is found, 0 otherwise")
ELSE(MESA_SOURCE_PREFIX)
SET(MESA_SOURCE_FOUND 0 CACHE STRING "Set to 1 if mesa source code is found, 0 otherwise")
ENDIF(MESA_SOURCE_PREFIX)