blob: f5061126b55979f767c890e24e8b8e924b6946ba [file] [log] [blame]
Stéphane Marchesin04589e12016-02-29 22:19:09 -08001message("*** Using Surfaceless target")
2
3set(DEQP_TARGET_NAME "Surfaceless")
4
5include(FindPkgConfig)
6
7set(DEQP_USE_SURFACELESS ON)
8
9set(DEQP_SUPPORT_GLES2 ON)
10set(DEQP_SUPPORT_GLES3 ON)
11set(DEQP_SUPPORT_EGL ON)
12
13find_library(GLES2_LIBRARIES GLESv2)
14find_library(GLES3_LIBRARIES GLESv3)
15find_path(GLES2_INCLUDE_PATH GLES2/gl2.h)
16find_path(GLES3_INCLUDE_PATH GLES3/gl3.h)
17
18if (GLES2_INCLUDE_PATH AND GLES2_LIBRARIES)
19 set(DEQP_GLES2_LIBRARIES ${GLES2_LIBRARIES})
20else ()
21 message (SEND_ERROR "GLESv2 support not found")
22endif ()
23
24if (GLES3_INCLUDE_PATH AND GLES3_LIBRARIES)
25 set(DEQP_GLES3_LIBRARIES ${GLES3_LIBRARIES})
26elseif (GLES3_INCLUDE_PATH AND GLES2_LIBRARIES)
27 # Assume GLESv2 provides ES3 symbols if gl3.h was found
28 # and the GLESv3 library was not.
29 set(DEQP_GLES3_LIBRARIES ${GLES2_LIBRARIES})
30else ()
31 message (FATAL_ERROR "GLESv3 support not found")
32endif ()
33
34pkg_check_modules(EGL REQUIRED egl)
35set(DEQP_EGL_LIBRARIES ${EGL_LIBRARIES})
36
37pkg_check_modules(GBM REQUIRED gbm)
38pkg_check_modules(KMS REQUIRED libkms)
39pkg_check_modules(DRM REQUIRED libdrm)
40
41include_directories(${GLES2_INCLUDE_PATH} ${GLES3_INCLUDE_PATH}
42 ${EGL_INCLUDE_DIRS} ${GBM_INCLUDE_DIRS}
43 ${KMS_INCLUDE_DIRS} ${DRM_INCLUDE_DIRS})
44
45set(DEQP_PLATFORM_LIBRARIES ${DEQP_GLES2_LIBRARIES} ${DEQP_GLES3_LIBRARIES}
46 ${DEQP_EGL_LIBRARIES} ${GBM_LIBRARIES}
47 ${KMS_LIBRARIES} ${DRM_LIBRARIES})