diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2019-09-18 09:19:39 +0200 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2019-09-20 07:28:05 +0000 |
commit | 9e875410997cf434709437c41a6cdbf1d2cb1b59 (patch) | |
tree | ccc3375151ba4a5728e091d126a0dd3e7ae8d1d0 /src | |
parent | 58a9cd22850fe2faccf75bef451f1e4d7176a51f (diff) |
Convert most config tests to configure.json inline format
And remove the now unused entries in config.tests. Now only the wayland-scanner
test remains, as that uses qmake features that do not easily translate to the
inline format.
This makes it much easier to port QtWayland to cmake.
This also removes some config.tests that weren't used.
Task-number: QTBUG-78177
Change-Id: Ia21a0025f9fac45b9f4815ee0f196e9e5759cdc6
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/client/configure.json | 59 | ||||
-rw-r--r-- | src/compositor/configure.json | 79 |
2 files changed, 129 insertions, 9 deletions
diff --git a/src/client/configure.json b/src/client/configure.json index e9e16324b..a25b61f55 100644 --- a/src/client/configure.json +++ b/src/client/configure.json @@ -61,25 +61,76 @@ "drm-egl-server": { "label": "DRM EGL Server", "type": "compile", - "test": "drm_egl_server", + "test": { + "include": [ + "EGL/egl.h", + "EGL/eglext.h" + ], + "main": [ + "#ifdef EGL_MESA_drm_image", + "return 0;", + "#else", + "#error Requires EGL_MESA_drm_image to be defined", + "return 1;", + "#endif" + ] + }, "use": "egl" }, "libhybris-egl-server": { "label": "libhybris EGL Server", "type": "compile", - "test": "libhybris_egl_server", + "test": { + "include": [ + "EGL/egl.h", + "EGL/eglext.h", + "hybris/eglplatformcommon/hybris_nativebufferext.h" + ], + "main": [ + "#ifdef EGL_HYBRIS_native_buffer", + "return 0;", + "#else", + "#error Requires EGL_HYBRIS_native_buffer to be defined", + "return 1;", + "#endif" + ] + }, "use": "egl" }, "dmabuf-server-buffer": { "label": "Linux dma-buf Buffer Sharing", "type": "compile", - "test": "dmabuf_server_buffer", + "test": { + "include": [ + "EGL/egl.h", + "EGL/eglext.h", + "drm_fourcc.h" + ], + "main": [ + "#ifdef EGL_LINUX_DMA_BUF_EXT", + "return 0;", + "#else", + "#error Requires EGL_LINUX_DMA_BUF_EXT", + "return 1;", + "#endif" + ] + }, "use": "egl" }, "vulkan-server-buffer": { "label": "Vulkan Buffer Sharing", "type": "compile", - "test": "vulkan_server_buffer" + "test": { + "include": [ + "vulkan/vulkan.h" + ], + "main": [ + "VkExportMemoryAllocateInfoKHR exportAllocInfo = {};", + "exportAllocInfo.sType = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR;", + "exportAllocInfo.handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR;", + "return 0;" + ] + } } }, diff --git a/src/compositor/configure.json b/src/compositor/configure.json index 46caceff5..9527bbf67 100644 --- a/src/compositor/configure.json +++ b/src/compositor/configure.json @@ -68,30 +68,99 @@ }, "drm-egl-server": { "type": "compile", - "test": "drm_egl_server", + "test": { + "include": [ + "EGL/egl.h", + "EGL/eglext.h" + ], + "main": [ + "#ifdef EGL_MESA_drm_image", + "return 0;", + "#else", + "#error Requires EGL_MESA_drm_image to be defined", + "return 1;", + "#endif" + ] + }, "use": "egl" }, "libhybris-egl-server": { "type": "compile", - "test": "libhybris_egl_server", + "test": { + "include": [ + "EGL/egl.h", + "EGL/eglext.h", + "hybris/eglplatformcommon/hybris_nativebufferext.h" + ], + "main": [ + "#ifdef EGL_HYBRIS_native_buffer", + "return 0;", + "#else", + "#error Requires EGL_HYBRIS_native_buffer to be defined", + "return 1;", + "#endif" + ] + }, "use": "egl" }, "dmabuf-server-buffer": { "label": "Linux dma-buf Buffer Sharing", "type": "compile", - "test": "dmabuf_server_buffer", + "test": { + "include": [ + "EGL/egl.h", + "EGL/eglext.h", + "drm_fourcc.h" + ], + "main": [ + "#ifdef EGL_LINUX_DMA_BUF_EXT", + "return 0;", + "#else", + "#error Requires EGL_LINUX_DMA_BUF_EXT", + "return 1;", + "#endif" + ] + }, "use": "egl" }, "dmabuf-client-buffer": { "label": "Linux Client dma-buf Buffer Sharing", "type": "compile", - "test": "dmabuf_client_buffer", + "test": { + "include": [ + "EGL/egl.h", + "EGL/eglext.h", + "drm_mode.h", + "drm_fourcc.h" + ], + "main": [ + "// test if DMA BUF is supported", + "#ifndef EGL_LINUX_DMA_BUF_EXT", + "#error DMA BUF Extension not available", + "#endif", + "// test if DMA BUF import modifier extension is supported", + "#ifndef EGL_EXT_image_dma_buf_import_modifiers", + "#error DMA BUF Import modifier extension not available", + "#endif", + "return 0;" + ] + }, "use": "egl" }, "vulkan-server-buffer": { "label": "Vulkan Buffer Sharing", "type": "compile", - "test": "vulkan_server_buffer" + "test": { + "include": [ + "vulkan/vulkan.h" + ], + "main": [ + "VkExportMemoryAllocateInfoKHR exportAllocInfo = {};", + "exportAllocInfo.sType = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR;", + "exportAllocInfo.handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR;", + "return 0;" + ] + } } }, |