summaryrefslogtreecommitdiffstats
path: root/meta-ivi/recipes-graphics/wayland/wayland-ivi-extension/0001-buildsystem-make-example-programs-link-to-the-genera.patch
blob: 37459f216973ccb93542c29ca58cc08651a7dda6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
From ef3507c482a342661ce8075f78359e653a4486cd Mon Sep 17 00:00:00 2001
From: Frederico Cadete <frederico.cadete@awtce.be>
Date: Thu, 17 Mar 2016 16:55:31 +0100
Subject: [PATCH] buildsystem: make example programs link to the generated
 protocols library

This avoids redefining the generation of protocol files
and fixes builds with parallel make (the header generation was missing).

Signed-off-by: Frederico Cadete <frederico.cadete@awtce.be>
---
 .../multi-touch-viewer/CMakeLists.txt                 | 10 +---------
 .../simple-ivi-share/CMakeLists.txt                   | 19 +------------------
 2 files changed, 2 insertions(+), 27 deletions(-)

diff --git a/ivi-layermanagement-examples/multi-touch-viewer/CMakeLists.txt b/ivi-layermanagement-examples/multi-touch-viewer/CMakeLists.txt
index 42f7d22..87623fe 100644
--- a/ivi-layermanagement-examples/multi-touch-viewer/CMakeLists.txt
+++ b/ivi-layermanagement-examples/multi-touch-viewer/CMakeLists.txt
@@ -25,14 +25,6 @@ project (generate-protocol-src)
 
 find_program(WAYLAND_SCANNER_EXECUTABLE NAMES wayland-scanner)
 
-add_custom_command(
-    OUTPUT  ivi-application-protocol.c
-    COMMAND ${WAYLAND_SCANNER_EXECUTABLE} code
-            < ${CMAKE_SOURCE_DIR}/protocol/ivi-application.xml
-            > ${CMAKE_CURRENT_BINARY_DIR}/ivi-application-protocol.c
-    DEPENDS ${CMAKE_SOURCE_DIR}/protocol/ivi-application.xml
-)
-
 ################################################################
 
 project (multi-touch-viewer)
@@ -61,6 +53,7 @@ link_directories(
 
 SET(LIBS
     ${LIBS}
+    ivi-extension-protocol
     ${GLESv2_LIBRARIES}
     ${WAYLAND_CLIENT_LIBRARIES}
     ${WAYLAND_EGL_LIBRARIES}
@@ -82,7 +75,6 @@ set(HEADER_FILES
 
 add_executable(${PROJECT_NAME}
                ${SRC_FILES}
-               ${CMAKE_CURRENT_BINARY_DIR}/ivi-application-protocol.c
 )
 
 add_dependencies(${PROJECT_NAME} ${LIBS})
diff --git a/ivi-layermanagement-examples/simple-ivi-share/CMakeLists.txt b/ivi-layermanagement-examples/simple-ivi-share/CMakeLists.txt
index 248eafd..7401d08 100644
--- a/ivi-layermanagement-examples/simple-ivi-share/CMakeLists.txt
+++ b/ivi-layermanagement-examples/simple-ivi-share/CMakeLists.txt
@@ -25,22 +25,6 @@ project (generate-protocol-src)
 
 find_program(WAYLAND_SCANNER_EXECUTABLE NAMES wayland-scanner)
 
-add_custom_command(
-    OUTPUT  ivi-application-protocol.c
-    COMMAND ${WAYLAND_SCANNER_EXECUTABLE} code
-            < ${CMAKE_SOURCE_DIR}/protocol/ivi-application.xml
-            > ${CMAKE_CURRENT_BINARY_DIR}/ivi-application-protocol.c
-    DEPENDS ${CMAKE_SOURCE_DIR}/protocol/ivi-application.xml
-)
-
-add_custom_command(
-    OUTPUT  ivi-share-protocol.c
-    COMMAND ${WAYLAND_SCANNER_EXECUTABLE} code
-            < ${CMAKE_SOURCE_DIR}/protocol/ivi-share.xml
-            > ${CMAKE_CURRENT_BINARY_DIR}/ivi-share-protocol.c
-    DEPENDS ${CMAKE_SOURCE_DIR}/protocol/ivi-share.xml
-)
-
 ################################################################
 
 project (simple-ivi-share)
@@ -69,6 +53,7 @@ link_directories(
 
 SET(LIBS
     ${LIBS}
+    ivi-extension-protocol
     ${GLESv2_LIBRARIES}
     ${WAYLAND_CLIENT_LIBRARIES}
     ${WAYLAND_EGL_LIBRARIES}
@@ -82,8 +67,6 @@ SET(SRC_FILES
 
 add_executable(${PROJECT_NAME}
                ${SRC_FILES}
-               ${CMAKE_CURRENT_BINARY_DIR}/ivi-application-protocol.c
-               ${CMAKE_CURRENT_BINARY_DIR}/ivi-share-protocol.c
 )
 
 add_dependencies(${PROJECT_NAME} ${LIBS})
-- 
1.9.1