diff options
Diffstat (limited to 'recipes-multimedia/onevpl/onevpl/0001-samples-Addin-wayland-scanner-auto-generate-on-cmake.patch')
-rw-r--r-- | recipes-multimedia/onevpl/onevpl/0001-samples-Addin-wayland-scanner-auto-generate-on-cmake.patch | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/recipes-multimedia/onevpl/onevpl/0001-samples-Addin-wayland-scanner-auto-generate-on-cmake.patch b/recipes-multimedia/onevpl/onevpl/0001-samples-Addin-wayland-scanner-auto-generate-on-cmake.patch deleted file mode 100644 index 351c707d..00000000 --- a/recipes-multimedia/onevpl/onevpl/0001-samples-Addin-wayland-scanner-auto-generate-on-cmake.patch +++ /dev/null | |||
@@ -1,88 +0,0 @@ | |||
1 | From 7f428b8d0ca95b43b70663c27b525c5d6f7bf28d Mon Sep 17 00:00:00 2001 | ||
2 | From: "Ung, Teng En" <teng.en.ung@intel.com> | ||
3 | Date: Tue, 25 Jan 2022 16:36:19 +0800 | ||
4 | Subject: [PATCH 1/3] samples: Addin wayland-scanner auto generate on cmake. | ||
5 | |||
6 | Upstream-Status: Submitted | ||
7 | innersource PR #269 | ||
8 | --- | ||
9 | tools/legacy/sample_common/CMakeLists.txt | 22 +++++++++++++++++++ | ||
10 | tools/legacy/sample_misc/wayland/CMakeLists.txt | 29 +++++++++++++++++++++++++ | ||
11 | 2 files changed, 51 insertions(+) | ||
12 | |||
13 | diff --git a/tools/legacy/sample_common/CMakeLists.txt b/tools/legacy/sample_common/CMakeLists.txt | ||
14 | index 24245cd..030ffee 100644 | ||
15 | --- a/tools/legacy/sample_common/CMakeLists.txt | ||
16 | +++ b/tools/legacy/sample_common/CMakeLists.txt | ||
17 | @@ -103,6 +103,28 @@ if(CMAKE_SYSTEM_NAME MATCHES Linux) | ||
18 | target_include_directories( | ||
19 | sample_common | ||
20 | PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../sample_misc/wayland/include) | ||
21 | + | ||
22 | + find_program(WAYLAND_SCANNER_BIN "wayland-scanner") | ||
23 | + pkg_check_modules(PKG_WAYLAND_PROTCOLS "wayland-protocols>=1.15") | ||
24 | + | ||
25 | + if(WAYLAND_SCANNER_BIN AND PKG_WAYLAND_PROTCOLS_FOUND) | ||
26 | + pkg_get_variable(WAYLAND_PROTOCOLS_PATH wayland-protocols pkgdatadir) | ||
27 | + if(WAYLAND_PROTOCOLS_PATH) | ||
28 | + find_file( | ||
29 | + WAYLAND_LINUX_DMABUF_XML_PATH linux-dmabuf-unstable-v1.xml | ||
30 | + PATHS ${WAYLAND_PROTOCOLS_PATH}/unstable/linux-dmabuf | ||
31 | + NO_DEFAULT_PATH) | ||
32 | + endif() | ||
33 | + endif() | ||
34 | + | ||
35 | + if(WAYLAND_LINUX_DMABUF_XML_PATH) | ||
36 | + target_compile_definitions( | ||
37 | + sample_common PUBLIC WAYLAND_LINUX_DMABUF_SUPPORT) | ||
38 | + target_include_directories( | ||
39 | + sample_common | ||
40 | + PUBLIC ${CMAKE_BINARY_DIR}/tools/legacy/sample_misc/wayland) | ||
41 | + endif() | ||
42 | + | ||
43 | else() | ||
44 | message( | ||
45 | WARNING | ||
46 | diff --git a/tools/legacy/sample_misc/wayland/CMakeLists.txt b/tools/legacy/sample_misc/wayland/CMakeLists.txt | ||
47 | index cf91987..a2dffbb 100644 | ||
48 | --- a/tools/legacy/sample_misc/wayland/CMakeLists.txt | ||
49 | +++ b/tools/legacy/sample_misc/wayland/CMakeLists.txt | ||
50 | @@ -20,6 +20,35 @@ target_sources( | ||
51 | ${CMAKE_CURRENT_SOURCE_DIR}/src/listener_wayland.cpp | ||
52 | ${CMAKE_CURRENT_SOURCE_DIR}/src/wayland-drm-protocol.c) | ||
53 | |||
54 | +if(WAYLAND_SCANNER_BIN AND PKG_WAYLAND_PROTCOLS_FOUND AND WAYLAND_LINUX_DMABUF_XML_PATH) | ||
55 | + execute_process( | ||
56 | + COMMAND "${WAYLAND_SCANNER_BIN_PATH}\/${WAYLAND_SCANNER_BIN}" | ||
57 | + "client-header" "${WAYLAND_LINUX_DMABUF_XML_PATH}" | ||
58 | + "tools/legacy/sample_misc/wayland/linux-dmabuf-unstable-v1.h" | ||
59 | + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" | ||
60 | + RESULT_VARIABLE WAYLAND_SCANNER_RESULT) | ||
61 | + if (WAYLAND_SCANNER_RESULT) | ||
62 | + message(FATAL_ERROR "Failed to generate linux-dmabuf-unstable-v1.h") | ||
63 | + endif() | ||
64 | + | ||
65 | + execute_process( | ||
66 | + COMMAND "${WAYLAND_SCANNER_BIN_PATH}\/${WAYLAND_SCANNER_BIN}" | ||
67 | + "private-code" "${WAYLAND_LINUX_DMABUF_XML_PATH}" | ||
68 | + "tools/legacy/sample_misc/wayland/linux-dmabuf-unstable-v1.c" | ||
69 | + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" | ||
70 | + RESULT_VARIABLE WAYLAND_SCANNER_RESULT) | ||
71 | + if (WAYLAND_SCANNER_RESULT) | ||
72 | + message(FATAL_ERROR "Failed to generate linux-dmabuf-unstable-v1.c") | ||
73 | + endif() | ||
74 | + | ||
75 | + target_include_directories( | ||
76 | + vpl_wayland PRIVATE ${CMAKE_BINARY_DIR}/tools/legacy/sample_misc/wayland) | ||
77 | + target_sources( | ||
78 | + vpl_wayland | ||
79 | + PRIVATE ${CMAKE_BINARY_DIR}/tools/legacy/sample_misc/wayland/linux-dmabuf-unstable-v1.c) | ||
80 | +endif() | ||
81 | + | ||
82 | + | ||
83 | target_link_libraries(vpl_wayland PRIVATE sample_common wayland-client va drm | ||
84 | drm_intel) | ||
85 | |||
86 | -- | ||
87 | 2.7.4 | ||
88 | |||