xref: /aosp_15_r20/external/deqp/targets/surfaceless/surfaceless.cmake (revision 35238bce31c2a825756842865a792f8cf7f89930)
1message("*** 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
37include_directories(${GLES2_INCLUDE_PATH} ${GLES3_INCLUDE_PATH}
38                    ${EGL_INCLUDE_DIRS} ${GBM_INCLUDE_DIRS}
39                    ${KMS_INCLUDE_DIRS} ${DRM_INCLUDE_DIRS})
40
41set(DEQP_PLATFORM_LIBRARIES ${DEQP_GLES2_LIBRARIES} ${DEQP_GLES3_LIBRARIES}
42                            ${DEQP_EGL_LIBRARIES} ${GBM_LIBRARIES}
43                            ${KMS_LIBRARIES} ${DRM_LIBRARIES})
44