Fix missing dependency on sparse binds
[platform/upstream/VK-GL-CTS.git] / targets / surfaceless / surfaceless.cmake
1 message("*** Using Surfaceless target")
2
3 set(DEQP_TARGET_NAME "Surfaceless")
4
5 include(FindPkgConfig)
6
7 set(DEQP_USE_SURFACELESS ON)
8
9 set(DEQP_SUPPORT_GLES2   ON)
10 set(DEQP_SUPPORT_GLES3   ON)
11 set(DEQP_SUPPORT_EGL     ON)
12
13 find_library(GLES2_LIBRARIES GLESv2)
14 find_library(GLES3_LIBRARIES GLESv3)
15 find_path(GLES2_INCLUDE_PATH GLES2/gl2.h)
16 find_path(GLES3_INCLUDE_PATH GLES3/gl3.h)
17
18 if (GLES2_INCLUDE_PATH AND GLES2_LIBRARIES)
19         set(DEQP_GLES2_LIBRARIES ${GLES2_LIBRARIES})
20 else ()
21         message (SEND_ERROR "GLESv2 support not found")
22 endif ()
23
24 if (GLES3_INCLUDE_PATH AND GLES3_LIBRARIES)
25         set(DEQP_GLES3_LIBRARIES ${GLES3_LIBRARIES})
26 elseif (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})
30 else ()
31         message (FATAL_ERROR "GLESv3 support not found")
32 endif ()
33
34 pkg_check_modules(EGL REQUIRED egl)
35 set(DEQP_EGL_LIBRARIES ${EGL_LIBRARIES})
36
37 include_directories(${GLES2_INCLUDE_PATH} ${GLES3_INCLUDE_PATH}
38                     ${EGL_INCLUDE_DIRS} ${GBM_INCLUDE_DIRS}
39                     ${KMS_INCLUDE_DIRS} ${DRM_INCLUDE_DIRS})
40
41 set(DEQP_PLATFORM_LIBRARIES ${DEQP_GLES2_LIBRARIES} ${DEQP_GLES3_LIBRARIES}
42                             ${DEQP_EGL_LIBRARIES} ${GBM_LIBRARIES}
43                             ${KMS_LIBRARIES} ${DRM_LIBRARIES})