aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-graphics/userland/files
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-graphics/userland/files')
-rw-r--r--recipes-graphics/userland/files/0001-Allow-applications-to-set-next-resource-handle.patch9
-rw-r--r--recipes-graphics/userland/files/0001-mmal-Do-not-use-Werror.patch33
-rw-r--r--recipes-graphics/userland/files/0002-wayland-Add-support-for-the-Wayland-winsys.patch27
-rw-r--r--recipes-graphics/userland/files/0003-wayland-Add-Wayland-example.patch9
-rw-r--r--recipes-graphics/userland/files/0004-wayland-egl-Add-bcm_host-to-dependencies.patch9
-rw-r--r--recipes-graphics/userland/files/0005-interface-remove-faulty-assert-to-make-weston-happy-.patch11
-rw-r--r--recipes-graphics/userland/files/0006-zero-out-wl-buffers-in-egl_surface_free.patch9
-rw-r--r--recipes-graphics/userland/files/0007-initialize-front-back-wayland-buffers.patch9
-rw-r--r--recipes-graphics/userland/files/0008-Remove-RPC_FLUSH.patch9
-rw-r--r--recipes-graphics/userland/files/0009-fix-cmake-dependency-race.patch11
-rw-r--r--recipes-graphics/userland/files/0010-Fix-for-framerate-with-nested-composition.patch9
-rw-r--r--recipes-graphics/userland/files/0011-build-shared-library-for-vchostif.patch11
-rw-r--r--recipes-graphics/userland/files/0012-implement-buffer-wrapping-interface-for-dispmanx.patch9
-rw-r--r--recipes-graphics/userland/files/0013-Implement-triple-buffering-for-wayland.patch9
-rw-r--r--recipes-graphics/userland/files/0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch7
-rw-r--r--recipes-graphics/userland/files/0015-EGL-glplatform.h-define-EGL_CAST.patch7
-rw-r--r--recipes-graphics/userland/files/0016-Allow-multiple-wayland-compositor-state-data-per-pro.patch10
-rw-r--r--recipes-graphics/userland/files/0017-khronos-backport-typedef-for-EGL_EXT_image_dma_buf_i.patch8
-rw-r--r--recipes-graphics/userland/files/0018-Add-EGL_IMG_context_priority-related-defines.patch9
-rw-r--r--recipes-graphics/userland/files/0019-libfdt-Undefine-__wordsize-if-already-defined.patch9
-rw-r--r--recipes-graphics/userland/files/0020-openmaxil-add-pkg-config-file.patch9
-rw-r--r--recipes-graphics/userland/files/0021-cmake-Disable-format-overflow-warning-as-error.patch9
-rw-r--r--recipes-graphics/userland/files/0022-all-host_applications-remove-non-existent-projects.patch30
-rw-r--r--recipes-graphics/userland/files/0023-hello_pi-optionally-build-wayland-specific-app.patch28
-rw-r--r--recipes-graphics/userland/files/0024-userland-Sync-needed-defines-for-weston-build.patch40
-rw-r--r--recipes-graphics/userland/files/0025-CMakeLists.txt-.pc-respect-CMAKE_INSTALL_LIBDIR.patch725
26 files changed, 943 insertions, 122 deletions
diff --git a/recipes-graphics/userland/files/0001-Allow-applications-to-set-next-resource-handle.patch b/recipes-graphics/userland/files/0001-Allow-applications-to-set-next-resource-handle.patch
index ca39b78..63f6a81 100644
--- a/recipes-graphics/userland/files/0001-Allow-applications-to-set-next-resource-handle.patch
+++ b/recipes-graphics/userland/files/0001-Allow-applications-to-set-next-resource-handle.patch
@@ -1,12 +1,14 @@
-From d0956d198ceaf611314d61a0835fb5924b8a3577 Mon Sep 17 00:00:00 2001
+From 8a734f44beea9b10548ba696eaea1f5a76148fd5 Mon Sep 17 00:00:00 2001
From: Dom Cobley <dc4@broadcom.com>
Date: Tue, 9 Jul 2013 09:26:26 -0400
-Subject: [PATCH 01/21] Allow applications to set next resource handle
+Subject: [PATCH] Allow applications to set next resource handle
This patch adds provisions in userland to
let apps callers set the next rendereing dispmanx resource.
It's useful for implementing, say, a buffer carousel.
---
+Upstream-Status: Pending
+
interface/khronos/common/khrn_client_rpc.h | 2 ++
interface/khronos/common/khrn_int_ids.h | 2 ++
interface/khronos/egl/egl_client.c | 30 +++++++++++++++++++---
@@ -203,6 +205,3 @@ index 8a5734c..51b3580 100644
FN(void, eglIntSelectMipmap_impl, (EGL_SURFACE_ID_T s, int level))
FN(void, eglIntGetColorData_impl, (EGL_SURFACE_ID_T s, KHRN_IMAGE_FORMAT_T format, uint32_t width, uint32_t height, int32_t stride, uint32_t y_offset, void *data))
---
-2.27.0
-
diff --git a/recipes-graphics/userland/files/0001-mmal-Do-not-use-Werror.patch b/recipes-graphics/userland/files/0001-mmal-Do-not-use-Werror.patch
new file mode 100644
index 0000000..ff00d8b
--- /dev/null
+++ b/recipes-graphics/userland/files/0001-mmal-Do-not-use-Werror.patch
@@ -0,0 +1,33 @@
+From 15fbe266af3dcc5b7660397204b06d04364a953a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 2 Apr 2022 21:37:42 -0700
+Subject: [PATCH] mmal: Do not use -Werror
+
+Clang warns about unused-but-set variables
+interface/mmal/vc/mmal_vc_api.c:395:18: error: variable 'status' set but not used [-We
+rror,-Wunused-but-set-variable]
+| MMAL_STATUS_T status;
+| ^
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ interface/mmal/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/interface/mmal/CMakeLists.txt b/interface/mmal/CMakeLists.txt
+index 46f149d..c5c1642 100644
+--- a/interface/mmal/CMakeLists.txt
++++ b/interface/mmal/CMakeLists.txt
+@@ -3,7 +3,7 @@ if (NOT DEFINED LIBRARY_TYPE)
+ set(LIBRARY_TYPE SHARED)
+ endif (NOT DEFINED LIBRARY_TYPE)
+
+-add_definitions(-Wall -Werror)
++add_definitions(-Wall)
+
+ add_library(mmal SHARED util/mmal_util.c)
+
+--
+2.35.1
+
diff --git a/recipes-graphics/userland/files/0002-wayland-Add-support-for-the-Wayland-winsys.patch b/recipes-graphics/userland/files/0002-wayland-Add-support-for-the-Wayland-winsys.patch
index d2d9b49..1a9a51c 100644
--- a/recipes-graphics/userland/files/0002-wayland-Add-support-for-the-Wayland-winsys.patch
+++ b/recipes-graphics/userland/files/0002-wayland-Add-support-for-the-Wayland-winsys.patch
@@ -1,7 +1,7 @@
-From 75eb8ab4bec3e462607214d2e14c9f2eef73435f Mon Sep 17 00:00:00 2001
+From 3c1566e9c3b356cfcd8327fed0e537ed978c8e78 Mon Sep 17 00:00:00 2001
From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Date: Tue, 1 Oct 2013 13:19:20 +0200
-Subject: [PATCH 02/21] wayland: Add support for the Wayland winsys
+Subject: [PATCH] wayland: Add support for the Wayland winsys
* Adds EGL_WL_bind_wayland_display extension
* Adds wayland-egl library
@@ -19,6 +19,8 @@ vc_vchi_dispmanx.h
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
+Upstream-Status: Pending
+
.gitignore | 1 +
CMakeLists.txt | 11 +
README.md | 4 +
@@ -43,13 +45,13 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
.../khronos/wayland-egl/wayland-egl-priv.h | 53 ++++
interface/khronos/wayland-egl/wayland-egl.c | 59 +++++
.../khronos/wayland-egl/wayland-egl.pc.in | 10 +
- interface/vmcs_host/CMakeLists.txt | 21 +-
+ interface/vmcs_host/CMakeLists.txt | 13 +-
interface/vmcs_host/vc_dispmanx.h | 10 +
interface/vmcs_host/vc_vchi_dispmanx.c | 42 +++
interface/vmcs_host/vc_vchi_dispmanx.h | 15 ++
interface/wayland/dispmanx.xml | 123 +++++++++
makefiles/cmake/Wayland.cmake | 72 +++++
- 30 files changed, 1257 insertions(+), 99 deletions(-)
+ 30 files changed, 1253 insertions(+), 95 deletions(-)
create mode 100644 interface/khronos/common/linux/khrn_wayland.c
copy interface/{vmcs_host/vc_vchi_dispmanx.h => khronos/common/linux/khrn_wayland.h} (56%)
create mode 100644 interface/khronos/ext/egl_wayland.c
@@ -1551,7 +1553,7 @@ index 0000000..8bafc15
+Libs: -L${libdir} -lwayland-egl
+Cflags: -I${includedir}
diff --git a/interface/vmcs_host/CMakeLists.txt b/interface/vmcs_host/CMakeLists.txt
-index 4a914a7..c202204 100755
+index cbef80c..552312a 100755
--- a/interface/vmcs_host/CMakeLists.txt
+++ b/interface/vmcs_host/CMakeLists.txt
@@ -7,13 +7,24 @@
@@ -1559,15 +1561,11 @@ index 4a914a7..c202204 100755
add_definitions(-fno-strict-aliasing)
-add_library(vchostif
-- ${VMCS_TARGET}/vcfilesys.c ${VMCS_TARGET}/vcmisc.c
-- vc_vchi_gencmd.c vc_vchi_filesys.c vc_vchi_gpuserv.c
-- vc_vchi_tvservice.c vc_vchi_cecservice.c
-- vc_vchi_dispmanx.c vc_service_common.c)
+set(VCHOSTIF_SOURCE
-+ ${VMCS_TARGET}/vcfilesys.c ${VMCS_TARGET}/vcmisc.c
-+ vc_vchi_gencmd.c vc_vchi_filesys.c vc_vchi_gpuserv.c
-+ vc_vchi_tvservice.c vc_vchi_cecservice.c
-+ vc_vchi_dispmanx.c vc_service_common.c)
+ ${VMCS_TARGET}/vcmisc.c
+ vc_vchi_gencmd.c vc_vchi_gpuserv.c
+ vc_vchi_tvservice.c vc_vchi_cecservice.c
+ vc_vchi_dispmanx.c vc_service_common.c)
# ${VMCS_TARGET}/vmcs_main.c
# vc_vchi_haud.c
+
@@ -1893,6 +1891,3 @@ index 0000000..ad90d30
+ list(APPEND ${_sources} "${_server_header}")
+ set(${_sources} ${${_sources}} PARENT_SCOPE)
+endfunction()
---
-2.27.0
-
diff --git a/recipes-graphics/userland/files/0003-wayland-Add-Wayland-example.patch b/recipes-graphics/userland/files/0003-wayland-Add-Wayland-example.patch
index 59fc366..a9da68a 100644
--- a/recipes-graphics/userland/files/0003-wayland-Add-Wayland-example.patch
+++ b/recipes-graphics/userland/files/0003-wayland-Add-Wayland-example.patch
@@ -1,9 +1,11 @@
-From 3b568db9460c0359e8bda8256aa2161e5aafe07c Mon Sep 17 00:00:00 2001
+From 03053b119a625a03e28a86be0f0ab2aa9e2a6a49 Mon Sep 17 00:00:00 2001
From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Date: Tue, 1 Oct 2013 13:19:20 +0200
-Subject: [PATCH 03/21] wayland: Add Wayland example
+Subject: [PATCH] wayland: Add Wayland example
---
+Upstream-Status: Pending
+
.../linux/apps/hello_pi/CMakeLists.txt | 1 +
.../linux/apps/hello_pi/Makefile | 2 +
.../hello_pi/hello_wayland/CMakeLists.txt | 8 +
@@ -861,6 +863,3 @@ index 0000000..1a7bfc4
+ return 0;
+}
+
---
-2.27.0
-
diff --git a/recipes-graphics/userland/files/0004-wayland-egl-Add-bcm_host-to-dependencies.patch b/recipes-graphics/userland/files/0004-wayland-egl-Add-bcm_host-to-dependencies.patch
index ac4c513..5476f41 100644
--- a/recipes-graphics/userland/files/0004-wayland-egl-Add-bcm_host-to-dependencies.patch
+++ b/recipes-graphics/userland/files/0004-wayland-egl-Add-bcm_host-to-dependencies.patch
@@ -1,7 +1,7 @@
-From 3ce83fc1d4974d4db15ff72b4e856a29c60dbb83 Mon Sep 17 00:00:00 2001
+From 73e338f99f89bc85fe384759a385d95e904adb7f Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 10 Aug 2015 02:38:27 -0700
-Subject: [PATCH 04/21] wayland-egl: Add bcm_host to dependencies
+Subject: [PATCH] wayland-egl: Add bcm_host to dependencies
It uses headers like vcos_platform_types.h but does not
depend on module which should add the required include paths
@@ -9,6 +9,8 @@ lets add the dependency on bcm_host module which should do it
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
+Upstream-Status: Pending
+
interface/khronos/wayland-egl/wayland-egl.pc.in | 1 +
1 file changed, 1 insertion(+)
@@ -23,6 +25,3 @@ index 8bafc15..fd259c9 100644
+Requires: bcm_host
Libs: -L${libdir} -lwayland-egl
Cflags: -I${includedir}
---
-2.27.0
-
diff --git a/recipes-graphics/userland/files/0005-interface-remove-faulty-assert-to-make-weston-happy-.patch b/recipes-graphics/userland/files/0005-interface-remove-faulty-assert-to-make-weston-happy-.patch
index 33d4a55..8119a8c 100644
--- a/recipes-graphics/userland/files/0005-interface-remove-faulty-assert-to-make-weston-happy-.patch
+++ b/recipes-graphics/userland/files/0005-interface-remove-faulty-assert-to-make-weston-happy-.patch
@@ -1,14 +1,16 @@
-From cf4d2dba7150aad7f85eb7f5df0b0cfa9389da57 Mon Sep 17 00:00:00 2001
+From 8e79662e7b396325bee3f310a9406c74110cc7f4 Mon Sep 17 00:00:00 2001
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
Date: Sat, 24 Jan 2015 22:07:19 +0100
-Subject: [PATCH 05/21] interface: remove faulty assert() to make weston happy
- at runtime
+Subject: [PATCH] interface: remove faulty assert() to make weston happy at
+ runtime
This was removed after a discussion on IRC with the weston guys
('daniels' on irc.freenode.net/#wayland).
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
+Upstream-Status: Pending
+
interface/vmcs_host/vc_vchi_dispmanx.c | 1 -
1 file changed, 1 deletion(-)
@@ -24,6 +26,3 @@ index eab146e..29e0dee 100755
dispmanx_client.update_callback(handle, dispmanx_client.update_callback_param);
}
} else {
---
-2.27.0
-
diff --git a/recipes-graphics/userland/files/0006-zero-out-wl-buffers-in-egl_surface_free.patch b/recipes-graphics/userland/files/0006-zero-out-wl-buffers-in-egl_surface_free.patch
index 690d51d..8c37419 100644
--- a/recipes-graphics/userland/files/0006-zero-out-wl-buffers-in-egl_surface_free.patch
+++ b/recipes-graphics/userland/files/0006-zero-out-wl-buffers-in-egl_surface_free.patch
@@ -1,12 +1,14 @@
-From ce90048cb25a0c2c49c585ce3a4cd8c73a8ff55b Mon Sep 17 00:00:00 2001
+From 22652fec1206eb6e5b3c05e2c4933feffce922e8 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 6 Feb 2016 11:10:47 -0800
-Subject: [PATCH 06/21] zero-out wl buffers in egl_surface_free
+Subject: [PATCH] zero-out wl buffers in egl_surface_free
origins from buildroot
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
+Upstream-Status: Pending
+
interface/khronos/egl/egl_client_surface.c | 2 ++
1 file changed, 2 insertions(+)
@@ -28,6 +30,3 @@ index 42350bf..1f923d9 100644
}
#endif
}
---
-2.27.0
-
diff --git a/recipes-graphics/userland/files/0007-initialize-front-back-wayland-buffers.patch b/recipes-graphics/userland/files/0007-initialize-front-back-wayland-buffers.patch
index d964ed5..1e90126 100644
--- a/recipes-graphics/userland/files/0007-initialize-front-back-wayland-buffers.patch
+++ b/recipes-graphics/userland/files/0007-initialize-front-back-wayland-buffers.patch
@@ -1,12 +1,14 @@
-From 7f7e5b87104134b6710985c5f1c5936a59cccc98 Mon Sep 17 00:00:00 2001
+From 5c0fb637f8b1286da19b904c7be1692a4aa61244 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 6 Feb 2016 11:11:41 -0800
-Subject: [PATCH 07/21] initialize front back wayland buffers
+Subject: [PATCH] initialize front back wayland buffers
origins from metrological wayland support
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
+Upstream-Status: Pending
+
interface/khronos/egl/egl_client_surface.c | 3 +++
1 file changed, 3 insertions(+)
@@ -29,6 +31,3 @@ index 1f923d9..9a9582c 100644
resource = DISPMANX_NO_HANDLE;
}
#endif
---
-2.27.0
-
diff --git a/recipes-graphics/userland/files/0008-Remove-RPC_FLUSH.patch b/recipes-graphics/userland/files/0008-Remove-RPC_FLUSH.patch
index d9aba5e..9e496c7 100644
--- a/recipes-graphics/userland/files/0008-Remove-RPC_FLUSH.patch
+++ b/recipes-graphics/userland/files/0008-Remove-RPC_FLUSH.patch
@@ -1,12 +1,14 @@
-From 2291cf20017c297e6ed3afd56945cf8768c9901e Mon Sep 17 00:00:00 2001
+From 18839d288b60aa3592ba5a3ac4ac44eb8328a793 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 6 Feb 2016 11:09:18 -0800
-Subject: [PATCH 08/21] Remove RPC_FLUSH
+Subject: [PATCH] Remove RPC_FLUSH
Origins from buildroot
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
+Upstream-Status: Pending
+
interface/khronos/ext/gl_oes_egl_image_client.c | 1 -
1 file changed, 1 deletion(-)
@@ -22,6 +24,3 @@ index f9b7287..b04ffef 100644
#if EGL_BRCM_global_image
}
#endif
---
-2.27.0
-
diff --git a/recipes-graphics/userland/files/0009-fix-cmake-dependency-race.patch b/recipes-graphics/userland/files/0009-fix-cmake-dependency-race.patch
index 898408b..9d8355a 100644
--- a/recipes-graphics/userland/files/0009-fix-cmake-dependency-race.patch
+++ b/recipes-graphics/userland/files/0009-fix-cmake-dependency-race.patch
@@ -1,7 +1,7 @@
-From 736f489743b4a761afc928cbac197b28b3209bf1 Mon Sep 17 00:00:00 2001
+From f324e2724973aa76d054c3662d5d0903fd405390 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 6 Feb 2016 13:12:47 -0800
-Subject: [PATCH 09/21] fix cmake dependency race
+Subject: [PATCH] fix cmake dependency race
Fixes errors like
@@ -17,6 +17,8 @@ make[2]: ***
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
+Upstream-Status: Pending
+
interface/vcos/pthreads/CMakeLists.txt | 8 ++++++++
interface/vmcs_host/CMakeLists.txt | 8 --------
interface/vmcs_host/vc_vchi_dispmanx.h | 2 +-
@@ -42,7 +44,7 @@ index 1d81ca3..d6cd415 100644
add_library (vcos SHARED ${SOURCES})
target_link_libraries (vcos pthread dl rt)
diff --git a/interface/vmcs_host/CMakeLists.txt b/interface/vmcs_host/CMakeLists.txt
-index c202204..16d3184 100755
+index 552312a..775742d 100755
--- a/interface/vmcs_host/CMakeLists.txt
+++ b/interface/vmcs_host/CMakeLists.txt
@@ -15,14 +15,6 @@ set(VCHOSTIF_SOURCE
@@ -73,6 +75,3 @@ index f0bae30..8c44c58 100644
struct wl_dispmanx_server_buffer {
struct wl_resource *resource;
struct wl_dispmanx *dispmanx;
---
-2.27.0
-
diff --git a/recipes-graphics/userland/files/0010-Fix-for-framerate-with-nested-composition.patch b/recipes-graphics/userland/files/0010-Fix-for-framerate-with-nested-composition.patch
index 37f6abb..989f417 100644
--- a/recipes-graphics/userland/files/0010-Fix-for-framerate-with-nested-composition.patch
+++ b/recipes-graphics/userland/files/0010-Fix-for-framerate-with-nested-composition.patch
@@ -1,12 +1,14 @@
-From 450341ccd98801be1c3dc648e18211177f81a60d Mon Sep 17 00:00:00 2001
+From 09de2ce12ed8a879cc822cd20c5f2756d030808a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 29 Mar 2016 20:38:30 -0700
-Subject: [PATCH 10/21] Fix for framerate with nested composition
+Subject: [PATCH] Fix for framerate with nested composition
frame rate appears irregular and lower than expected when using nested composition.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
+Upstream-Status: Pending
+
interface/khronos/egl/egl_client.c | 8 ++++++++
1 file changed, 8 insertions(+)
@@ -55,6 +57,3 @@ index 03fe67b..13a110c 100644
#ifdef ANDROID
CLIENT_UNLOCK();
---
-2.27.0
-
diff --git a/recipes-graphics/userland/files/0011-build-shared-library-for-vchostif.patch b/recipes-graphics/userland/files/0011-build-shared-library-for-vchostif.patch
index 77f9ccb..691f476 100644
--- a/recipes-graphics/userland/files/0011-build-shared-library-for-vchostif.patch
+++ b/recipes-graphics/userland/files/0011-build-shared-library-for-vchostif.patch
@@ -1,17 +1,19 @@
-From 13f2a4d1c6b6e79389ac3aa64512d78882a11b2f Mon Sep 17 00:00:00 2001
+From 140df8cbf93fc3295f57bffeb254adeb0b17d3a0 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 2 Apr 2016 10:37:24 -0700
-Subject: [PATCH 11/21] build shared library for vchostif
+Subject: [PATCH] build shared library for vchostif
Fixes #149
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
+Upstream-Status: Pending
+
interface/vmcs_host/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/interface/vmcs_host/CMakeLists.txt b/interface/vmcs_host/CMakeLists.txt
-index 16d3184..e54f046 100755
+index 775742d..76813c9 100755
--- a/interface/vmcs_host/CMakeLists.txt
+++ b/interface/vmcs_host/CMakeLists.txt
@@ -15,7 +15,7 @@ set(VCHOSTIF_SOURCE
@@ -23,6 +25,3 @@ index 16d3184..e54f046 100755
#add_library(bufman vc_vchi_bufman.c )
set(INSTALL_TARGETS vchostif)
---
-2.27.0
-
diff --git a/recipes-graphics/userland/files/0012-implement-buffer-wrapping-interface-for-dispmanx.patch b/recipes-graphics/userland/files/0012-implement-buffer-wrapping-interface-for-dispmanx.patch
index 53403d7..87d7161 100644
--- a/recipes-graphics/userland/files/0012-implement-buffer-wrapping-interface-for-dispmanx.patch
+++ b/recipes-graphics/userland/files/0012-implement-buffer-wrapping-interface-for-dispmanx.patch
@@ -1,12 +1,14 @@
-From a09feea5ceb0af717c17a3a7df8a638f8e858f52 Mon Sep 17 00:00:00 2001
+From bdb5bbe994b91a7c64ca6103fbf2bbd590e6b8e5 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 2 Apr 2016 10:54:59 -0700
-Subject: [PATCH 12/21] implement buffer wrapping interface for dispmanx
+Subject: [PATCH] implement buffer wrapping interface for dispmanx
Courtesy: Zan Dobersek
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
+Upstream-Status: Pending
+
interface/khronos/ext/egl_wayland.c | 42 +++++++++++++++++++++++++++++
interface/wayland/dispmanx.xml | 10 +++++++
2 files changed, 52 insertions(+)
@@ -87,6 +89,3 @@ index c18626d..11ed1ef 100644
</interface>
</protocol>
---
-2.27.0
-
diff --git a/recipes-graphics/userland/files/0013-Implement-triple-buffering-for-wayland.patch b/recipes-graphics/userland/files/0013-Implement-triple-buffering-for-wayland.patch
index d5702cb..16cbbd7 100644
--- a/recipes-graphics/userland/files/0013-Implement-triple-buffering-for-wayland.patch
+++ b/recipes-graphics/userland/files/0013-Implement-triple-buffering-for-wayland.patch
@@ -1,7 +1,7 @@
-From dd8017ebccfa9c439a4e8dd501872e2052016f10 Mon Sep 17 00:00:00 2001
+From ffdcdf7605f4f266b408cf161e7c76dab54d689b Mon Sep 17 00:00:00 2001
From: Jeff Wannamaker <jeff_wannamaker@cable.comcast.com>
Date: Thu, 19 Jan 2017 18:56:07 +0000
-Subject: [PATCH 13/21] Implement triple buffering for wayland
+Subject: [PATCH] Implement triple buffering for wayland
Change from double to triple buffering for wayland.
This enables higher frame rates without tearing artifacts
@@ -12,6 +12,8 @@ to two vertical intervals
Signed-off-by: Jeff Wannamaker <jeff_wannamaker@cable.comcast.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
+Upstream-Status: Pending
+
interface/khronos/egl/egl_client.c | 3 ++-
interface/khronos/egl/egl_client_surface.c | 8 ++++++++
interface/khronos/egl/egl_client_surface.h | 11 +++++++++++
@@ -85,6 +87,3 @@ index e328b77..58a3184 100644
/*
back_wl_buffer
---
-2.27.0
-
diff --git a/recipes-graphics/userland/files/0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch b/recipes-graphics/userland/files/0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch
index 52f0315..7e637a0 100644
--- a/recipes-graphics/userland/files/0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch
+++ b/recipes-graphics/userland/files/0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch
@@ -1,7 +1,7 @@
-From afe3917b1a236c08b1ed01053e3da9ab283db1ec Mon Sep 17 00:00:00 2001
+From 4624c934d1a783968306e61ded4389c153e3d009 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 10 May 2017 06:39:34 +0000
-Subject: [PATCH 14/21] GLES2/gl2ext.h: Define GL_R8_EXT and GL_RG8_EXT
+Subject: [PATCH] GLES2/gl2ext.h: Define GL_R8_EXT and GL_RG8_EXT
weston code uses these defines
Upstream-Status: Pending
@@ -30,6 +30,3 @@ index 4eacf7f..b1acc9f 100644
/* GL_EXT_texture_type_2_10_10_10_REV */
#ifndef GL_EXT_texture_type_2_10_10_10_REV
#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368
---
-2.27.0
-
diff --git a/recipes-graphics/userland/files/0015-EGL-glplatform.h-define-EGL_CAST.patch b/recipes-graphics/userland/files/0015-EGL-glplatform.h-define-EGL_CAST.patch
index 964d0ec..1c2e5bc 100644
--- a/recipes-graphics/userland/files/0015-EGL-glplatform.h-define-EGL_CAST.patch
+++ b/recipes-graphics/userland/files/0015-EGL-glplatform.h-define-EGL_CAST.patch
@@ -1,7 +1,7 @@
-From 47972590947e5da25d77cae0ce060f7b8d022a10 Mon Sep 17 00:00:00 2001
+From 528a439539a77e67bf136d425eac3240ca6f1cd7 Mon Sep 17 00:00:00 2001
From: Andrea Galbusera <gizero@gmail.com>
Date: Fri, 14 Jul 2017 09:52:54 +0200
-Subject: [PATCH 15/21] EGL/glplatform.h: define EGL_CAST
+Subject: [PATCH] EGL/glplatform.h: define EGL_CAST
C++ / C typecast macros for special EGL handle values: used by libepoxy code
The definition comes from the updated version of this header in mesa.
@@ -27,6 +27,3 @@ index 1f7c930..c39d425 100644
+#endif
+
#endif /* __eglplatform_h */
---
-2.27.0
-
diff --git a/recipes-graphics/userland/files/0016-Allow-multiple-wayland-compositor-state-data-per-pro.patch b/recipes-graphics/userland/files/0016-Allow-multiple-wayland-compositor-state-data-per-pro.patch
index 3790f80..37ca456 100644
--- a/recipes-graphics/userland/files/0016-Allow-multiple-wayland-compositor-state-data-per-pro.patch
+++ b/recipes-graphics/userland/files/0016-Allow-multiple-wayland-compositor-state-data-per-pro.patch
@@ -1,8 +1,7 @@
-From 1eb8bdb4d45e3de9582145c120b0d3ede187c7a9 Mon Sep 17 00:00:00 2001
+From c5969e5e5c50e2c9b32c6f945040a8e5763ba06c Mon Sep 17 00:00:00 2001
From: Jeff Wannamaker <jeff_wannamaker@cable.comcast.com>
Date: Sat, 27 Jan 2018 12:28:31 -0500
-Subject: [PATCH 16/21] Allow multiple wayland compositor state data per
- process
+Subject: [PATCH] Allow multiple wayland compositor state data per process
When eglBindWaylandDisplayWL is called store the wl_global
created in a list associated with the wayland display.
@@ -14,6 +13,8 @@ via embedded composition e.g. westeros
Signed-off-by: Jeff Wannamaker <jeff_wannamaker@cable.comcast.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
+Upstream-Status: Pending
+
interface/khronos/common/khrn_client.c | 2 +-
interface/khronos/common/khrn_client.h | 11 +++++-
interface/khronos/ext/egl_wayland.c | 50 ++++++++++++++++++++++----
@@ -140,6 +141,3 @@ index 9ef89cd..abd5ab3 100644
CLIENT_UNLOCK();
---
-2.27.0
-
diff --git a/recipes-graphics/userland/files/0017-khronos-backport-typedef-for-EGL_EXT_image_dma_buf_i.patch b/recipes-graphics/userland/files/0017-khronos-backport-typedef-for-EGL_EXT_image_dma_buf_i.patch
index c3457cd..97340d7 100644
--- a/recipes-graphics/userland/files/0017-khronos-backport-typedef-for-EGL_EXT_image_dma_buf_i.patch
+++ b/recipes-graphics/userland/files/0017-khronos-backport-typedef-for-EGL_EXT_image_dma_buf_i.patch
@@ -1,8 +1,7 @@
-From 99a210c93019d37dd7f044102c4314c8cb988ed4 Mon Sep 17 00:00:00 2001
+From 8091dac73f792fb000e7ec97de6be23cd84b7cb7 Mon Sep 17 00:00:00 2001
From: Hugo Hromic <hhromic@gmail.com>
Date: Sun, 13 May 2018 10:49:04 +0100
-Subject: [PATCH 17/21] khronos: backport typedef for
- EGL_EXT_image_dma_buf_import
+Subject: [PATCH] khronos: backport typedef for EGL_EXT_image_dma_buf_import
The `gstreamer1.0-plugins-base` package version `1.14` uses `EGL_EXT_image_dma_buf_import`, which
expects the `EGLuint64KHR` typedef that is present in recent versions of Khronos.
@@ -33,6 +32,3 @@ index d7e5ba7..dcc90ce 100755
#ifndef EGL_WL_bind_wayland_display
#define EGL_WL_bind_wayland_display 1
---
-2.27.0
-
diff --git a/recipes-graphics/userland/files/0018-Add-EGL_IMG_context_priority-related-defines.patch b/recipes-graphics/userland/files/0018-Add-EGL_IMG_context_priority-related-defines.patch
index 5317c60..94566dc 100644
--- a/recipes-graphics/userland/files/0018-Add-EGL_IMG_context_priority-related-defines.patch
+++ b/recipes-graphics/userland/files/0018-Add-EGL_IMG_context_priority-related-defines.patch
@@ -1,13 +1,15 @@
-From 82cf4bc5623c5220dfa1c096ea192f2509837782 Mon Sep 17 00:00:00 2001
+From 214f1895db14e3a88d5b2b3b6c844af3890e2eba Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 15 Jul 2018 00:48:38 -0700
-Subject: [PATCH 18/21] Add EGL_IMG_context_priority related defines
+Subject: [PATCH] Add EGL_IMG_context_priority related defines
These defines are needed for compiling weston 4.x
taken from Khronos headers
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
+Upstream-Status: Pending
+
interface/khronos/include/EGL/eglext.h | 8 ++++++++
1 file changed, 8 insertions(+)
@@ -30,6 +32,3 @@ index dcc90ce..6842bf9 100755
#ifndef EGL_KHR_vg_parent_image
#define EGL_KHR_vg_parent_image 1
#define EGL_VG_PARENT_IMAGE_KHR 0x30BA /* eglCreateImageKHR target */
---
-2.27.0
-
diff --git a/recipes-graphics/userland/files/0019-libfdt-Undefine-__wordsize-if-already-defined.patch b/recipes-graphics/userland/files/0019-libfdt-Undefine-__wordsize-if-already-defined.patch
index cd6306b..4f91c71 100644
--- a/recipes-graphics/userland/files/0019-libfdt-Undefine-__wordsize-if-already-defined.patch
+++ b/recipes-graphics/userland/files/0019-libfdt-Undefine-__wordsize-if-already-defined.patch
@@ -1,13 +1,15 @@
-From 1112539d9fde6428c1230b4fc9ea479623e9f968 Mon Sep 17 00:00:00 2001
+From bcdc525b2e4403f9e878e93cbd0d146ce9e37bb8 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 25 Jul 2019 23:30:27 -0700
-Subject: [PATCH 19/21] libfdt: Undefine __wordsize if already defined
+Subject: [PATCH] libfdt: Undefine __wordsize if already defined
glibc 2.30+ defines __wordsize, which is same so its easier to compile
for multiple versions of glibc even ones which does not have this define
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
+Upstream-Status: Pending
+
opensrc/helpers/libfdt/libfdt_env.h | 4 ++++
1 file changed, 4 insertions(+)
@@ -26,6 +28,3 @@ index f4608be..5e83a27 100644
#ifdef __CHECKER__
#define FDT_FORCE __attribute__((force))
#define FDT_BITWISE __attribute__((bitwise))
---
-2.27.0
-
diff --git a/recipes-graphics/userland/files/0020-openmaxil-add-pkg-config-file.patch b/recipes-graphics/userland/files/0020-openmaxil-add-pkg-config-file.patch
index e9d9da6..e23f4d9 100644
--- a/recipes-graphics/userland/files/0020-openmaxil-add-pkg-config-file.patch
+++ b/recipes-graphics/userland/files/0020-openmaxil-add-pkg-config-file.patch
@@ -1,9 +1,11 @@
-From 488916a6b366bfa5da2907b5892798eb2306a17d Mon Sep 17 00:00:00 2001
+From 372b3b75945300604c9b7b012ecb25c0548a1495 Mon Sep 17 00:00:00 2001
From: Martin Jansa <martin.jansa@lge.com>
Date: Wed, 13 Jun 2018 18:22:22 +0000
-Subject: [PATCH 20/21] openmaxil: add pkg-config file
+Subject: [PATCH] openmaxil: add pkg-config file
---
+Upstream-Status: Pending
+
CMakeLists.txt | 2 +-
pkgconfig/openmaxil.pc.in | 10 ++++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
@@ -38,6 +40,3 @@ index 0000000..8793a61
+Version: 1
+Libs: -L${libdir} -lopenmaxil -lvcos -lvchiq_arm -pthread
+Cflags: -I${includedir} -I${includedir}/IL -I${includedir}/interface/vmcs_host/linux -I${includedir}/interface/vcos/pthreads -DUSE_VCHIQ_ARM
---
-2.27.0
-
diff --git a/recipes-graphics/userland/files/0021-cmake-Disable-format-overflow-warning-as-error.patch b/recipes-graphics/userland/files/0021-cmake-Disable-format-overflow-warning-as-error.patch
index c762a9f..43f9f29 100644
--- a/recipes-graphics/userland/files/0021-cmake-Disable-format-overflow-warning-as-error.patch
+++ b/recipes-graphics/userland/files/0021-cmake-Disable-format-overflow-warning-as-error.patch
@@ -1,7 +1,7 @@
-From ee842886f3c0589d6df5a0687973beb18a3be524 Mon Sep 17 00:00:00 2001
+From d08003ab30452b4268121bcf82e03fdf21c89cdd Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 31 Mar 2020 11:51:02 -0700
-Subject: [PATCH 21/21] cmake: Disable format-overflow warning as error
+Subject: [PATCH] cmake: Disable format-overflow warning as error
gcc10 complains about a check which could potentially be null
@@ -20,7 +20,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/host_applications/linux/libs/bcm_host/CMakeLists.txt b/host_applications/linux/libs/bcm_host/CMakeLists.txt
-index a863cb6..f358135 100644
+index 2f4beb9..7a4ab06 100644
--- a/host_applications/linux/libs/bcm_host/CMakeLists.txt
+++ b/host_applications/linux/libs/bcm_host/CMakeLists.txt
@@ -3,7 +3,7 @@ if (WIN32)
@@ -32,6 +32,3 @@ index a863cb6..f358135 100644
endif ()
# set this as we want all the source of vchostif to be available in libbcm_host
---
-2.27.0
-
diff --git a/recipes-graphics/userland/files/0022-all-host_applications-remove-non-existent-projects.patch b/recipes-graphics/userland/files/0022-all-host_applications-remove-non-existent-projects.patch
new file mode 100644
index 0000000..7e3de5f
--- /dev/null
+++ b/recipes-graphics/userland/files/0022-all-host_applications-remove-non-existent-projects.patch
@@ -0,0 +1,30 @@
+From 451e8458e45926e4e1c0433864ac4cf8b05d792b Mon Sep 17 00:00:00 2001
+From: Trevor Woerner <twoerner@gmail.com>
+Date: Fri, 27 Nov 2020 03:12:26 -0500
+Subject: [PATCH] all host_applications: remove non-existent projects
+
+The ALL_APPS symbol will optionally build an additional set of projects,
+however, several of them don't exist anymore. Remove them from the list of
+ALL_APPS.
+
+Upstream-Status: Submitted [https://github.com/raspberrypi/userland/pull/661]
+Signed-off-by: Trevor Woerner <twoerner@gmail.com>
+---
+ host_applications/linux/CMakeLists.txt | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/host_applications/linux/CMakeLists.txt b/host_applications/linux/CMakeLists.txt
+index 928b637..554ae46 100644
+--- a/host_applications/linux/CMakeLists.txt
++++ b/host_applications/linux/CMakeLists.txt
+@@ -14,10 +14,6 @@ add_subdirectory(apps/dtoverlay)
+ add_subdirectory(apps/dtmerge)
+
+ if(ALL_APPS)
+- add_subdirectory(apps/vcdbg)
+- add_subdirectory(libs/elftoolchain)
+- # add_subdirectory(apps/smct)
+- add_subdirectory(apps/edid_parser)
+ add_subdirectory(apps/hello_pi)
+ endif()
+
diff --git a/recipes-graphics/userland/files/0023-hello_pi-optionally-build-wayland-specific-app.patch b/recipes-graphics/userland/files/0023-hello_pi-optionally-build-wayland-specific-app.patch
new file mode 100644
index 0000000..e3b093a
--- /dev/null
+++ b/recipes-graphics/userland/files/0023-hello_pi-optionally-build-wayland-specific-app.patch
@@ -0,0 +1,28 @@
+From 5f4324a0008c2e8e1f511432f98bf85c9fffd35c Mon Sep 17 00:00:00 2001
+From: Trevor Woerner <twoerner@gmail.com>
+Date: Fri, 27 Nov 2020 03:18:50 -0500
+Subject: [PATCH] hello_pi: optionally build wayland-specific app
+
+Only build the wayland-specific hello_pi app when building for wayland.
+
+Upstream-Status: Inappropriate [the wayland example is not part of upstream]
+Signed-off-by: Trevor Woerner <twoerner@gmail.com>
+---
+ host_applications/linux/apps/hello_pi/CMakeLists.txt | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/host_applications/linux/apps/hello_pi/CMakeLists.txt b/host_applications/linux/apps/hello_pi/CMakeLists.txt
+index 2849fad..7de3265 100644
+--- a/host_applications/linux/apps/hello_pi/CMakeLists.txt
++++ b/host_applications/linux/apps/hello_pi/CMakeLists.txt
+@@ -25,7 +25,9 @@ add_subdirectory(hello_encode)
+ add_subdirectory(hello_jpeg)
+ add_subdirectory(hello_videocube)
+ add_subdirectory(hello_teapot)
+-add_subdirectory(hello_wayland)
++if (BUILD_WAYLAND)
++ add_subdirectory(hello_wayland)
++endif()
+
+ if(BUILD_FONT)
+ set(VGFONT_SRCS libs/vgfont/font.c libs/vgfont/vgft.c libs/vgfont/graphics.c)
diff --git a/recipes-graphics/userland/files/0024-userland-Sync-needed-defines-for-weston-build.patch b/recipes-graphics/userland/files/0024-userland-Sync-needed-defines-for-weston-build.patch
new file mode 100644
index 0000000..aff95b7
--- /dev/null
+++ b/recipes-graphics/userland/files/0024-userland-Sync-needed-defines-for-weston-build.patch
@@ -0,0 +1,40 @@
+From 4a3e515d3ea7ff0fc4063b9677b056af4ee7a3f6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 2 Dec 2020 14:28:01 -0800
+Subject: [PATCH] userland: Sync needed defines for weston build
+
+eglext.h from userland is not sufficient to compile latest weston,
+therefore import needed defines and typedefs from latest mesa
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ interface/khronos/include/EGL/eglext.h | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/interface/khronos/include/EGL/eglext.h b/interface/khronos/include/EGL/eglext.h
+index 6842bf9..7118e92 100755
+--- a/interface/khronos/include/EGL/eglext.h
++++ b/interface/khronos/include/EGL/eglext.h
+@@ -225,6 +225,20 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYWAYLANDBUFFERWL) (EGLDisplay dpy, st
+
+ #endif
+
++typedef void* EGLSyncKHR;
++typedef EGLBoolean (EGLAPIENTRYP PFNEGLSETDAMAGEREGIONKHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
++typedef EGLint (EGLAPIENTRYP PFNEGLWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags);
++#ifndef EGL_ANDROID_native_fence_sync
++#define EGL_ANDROID_native_fence_sync 1
++#define EGL_SYNC_NATIVE_FENCE_ANDROID 0x3144
++#define EGL_SYNC_NATIVE_FENCE_FD_ANDROID 0x3145
++#define EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID 0x3146
++#define EGL_NO_NATIVE_FENCE_FD_ANDROID -1
++typedef EGLint (EGLAPIENTRYP PFNEGLDUPNATIVEFENCEFDANDROIDPROC) (EGLDisplay dpy, EGLSyncKHR sync);
++#ifdef EGL_EGLEXT_PROTOTYPES
++EGLAPI EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID (EGLDisplay dpy, EGLSyncKHR sync);
++#endif
++#endif /* EGL_ANDROID_native_fence_sync */
+
+ #ifdef __cplusplus
+ }
diff --git a/recipes-graphics/userland/files/0025-CMakeLists.txt-.pc-respect-CMAKE_INSTALL_LIBDIR.patch b/recipes-graphics/userland/files/0025-CMakeLists.txt-.pc-respect-CMAKE_INSTALL_LIBDIR.patch
new file mode 100644
index 0000000..6f4c722
--- /dev/null
+++ b/recipes-graphics/userland/files/0025-CMakeLists.txt-.pc-respect-CMAKE_INSTALL_LIBDIR.patch
@@ -0,0 +1,725 @@
+From 8f7fba136391e2020cd0fc9dca76932d3faa21eb Mon Sep 17 00:00:00 2001
+From: Martin Jansa <martin.jansa@gmail.com>
+Date: Fri, 8 Mar 2024 16:29:22 +0100
+Subject: [PATCH] CMakeLists.txt, *.pc: respect CMAKE_INSTALL_LIBDIR
+
+* and CMAKE_INSTALL_BINDIR, CMAKE_INSTALL_INCLUDEDIR as well
+* fixes installation paths with multilib
+ lib32-userland fails with:
+
+ERROR: QA Issue: lib32-userland: Files/directories were installed but not shipped in any package:
+ /usr/lib/libbrcmEGL.so
+ /usr/lib/libvchiq_arm.so
+...
+ /usr/lib/pkgconfig/wayland-egl.pc
+Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
+lib32-userland: 66 installed and not shipped files. [installed-vs-shipped]
+
+Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
+---
+Upstream-Status: Pending
+
+ CMakeLists.txt | 2 +-
+ containers/CMakeLists.txt | 2 +-
+ containers/test/CMakeLists.txt | 24 +++++++++----------
+ helpers/dtoverlay/CMakeLists.txt | 2 +-
+ .../linux/apps/dtmerge/CMakeLists.txt | 2 +-
+ .../linux/apps/dtoverlay/CMakeLists.txt | 6 ++---
+ .../linux/apps/gencmd/CMakeLists.txt | 2 +-
+ .../apps/hello_pi/hello_audio/CMakeLists.txt | 2 +-
+ .../hello_pi/hello_dispmanx/CMakeLists.txt | 2 +-
+ .../apps/hello_pi/hello_encode/CMakeLists.txt | 2 +-
+ .../apps/hello_pi/hello_font/CMakeLists.txt | 2 +-
+ .../apps/hello_pi/hello_jpeg/CMakeLists.txt | 2 +-
+ .../apps/hello_pi/hello_teapot/CMakeLists.txt | 2 +-
+ .../apps/hello_pi/hello_tiger/CMakeLists.txt | 2 +-
+ .../hello_pi/hello_triangle/CMakeLists.txt | 2 +-
+ .../hello_pi/hello_triangle2/CMakeLists.txt | 2 +-
+ .../apps/hello_pi/hello_video/CMakeLists.txt | 2 +-
+ .../hello_pi/hello_videocube/CMakeLists.txt | 2 +-
+ .../hello_pi/hello_wayland/CMakeLists.txt | 2 +-
+ .../apps/hello_pi/hello_world/CMakeLists.txt | 2 +-
+ .../linux/apps/raspicam/CMakeLists.txt | 2 +-
+ .../linux/apps/smem/CMakeLists.txt | 2 +-
+ .../linux/apps/tvservice/CMakeLists.txt | 2 +-
+ .../linux/apps/vcmailbox/CMakeLists.txt | 2 +-
+ .../linux/libs/bcm_host/CMakeLists.txt | 2 +-
+ .../linux/libs/debug_sym/CMakeLists.txt | 6 ++---
+ .../linux/libs/sm/CMakeLists.txt | 4 ++--
+ interface/khronos/CMakeLists.txt | 10 ++++----
+ interface/mmal/CMakeLists.txt | 4 ++--
+ interface/mmal/components/CMakeLists.txt | 2 +-
+ interface/mmal/core/CMakeLists.txt | 4 ++--
+ interface/mmal/util/CMakeLists.txt | 4 ++--
+ interface/mmal/vc/CMakeLists.txt | 6 ++---
+ interface/vchiq_arm/CMakeLists.txt | 4 ++--
+ interface/vcos/CMakeLists.txt | 2 +-
+ interface/vcos/generic/CMakeLists.txt | 2 +-
+ interface/vcos/pthreads/CMakeLists.txt | 4 ++--
+ interface/vmcs_host/CMakeLists.txt | 2 +-
+ makefiles/cmake/vmcs.cmake | 2 +-
+ middleware/openmaxil/CMakeLists.txt | 2 +-
+ pkgconfig/bcm_host.pc.in | 2 +-
+ pkgconfig/brcmegl.pc.in | 2 +-
+ pkgconfig/brcmglesv2.pc.in | 2 +-
+ pkgconfig/brcmvg.pc.in | 2 +-
+ pkgconfig/mmal.pc.in | 2 +-
+ pkgconfig/vcsm.pc.in | 2 +-
+ 46 files changed, 73 insertions(+), 73 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3e3c90e..0bb54b7 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -136,7 +136,7 @@ if(PKG_CONFIG_FOUND)
+ foreach(PCFILE bcm_host.pc brcmegl.pc brcmglesv2.pc brcmvg.pc vcsm.pc mmal.pc openmaxil.pc)
+ configure_file("pkgconfig/${PCFILE}.in" "${PCFILE}" @ONLY)
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PCFILE}"
+- DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig")
++ DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
+ endforeach()
+ endif()
+ # Remove cache entry, if one added by command line
+diff --git a/containers/CMakeLists.txt b/containers/CMakeLists.txt
+index 5570038..6c3d39c 100644
+--- a/containers/CMakeLists.txt
++++ b/containers/CMakeLists.txt
+@@ -66,7 +66,7 @@ set(packetizers_SRCS ${packetizers_SRCS} ${SOURCE_DIR}/h264/avc1_packetizer.c)
+
+ add_library(containers ${LIBRARY_TYPE} ${core_SRCS} ${io_SRCS} ${net_SRCS} ${packetizers_SRCS})
+ target_link_libraries(containers vcos)
+-install(TARGETS containers DESTINATION lib)
++install(TARGETS containers DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
+ set(container_readers)
+ set(container_writers)
+diff --git a/containers/test/CMakeLists.txt b/containers/test/CMakeLists.txt
+index 7d36352..832ad0f 100644
+--- a/containers/test/CMakeLists.txt
++++ b/containers/test/CMakeLists.txt
+@@ -1,17 +1,17 @@
+ # Generate test application
+ add_executable(containers_test test.c)
+ target_link_libraries(containers_test -Wl,--no-whole-archive containers)
+-install(TARGETS containers_test DESTINATION bin)
++install(TARGETS containers_test DESTINATION ${CMAKE_INSTALL_BINDIR})
+
+ # Generate test application
+ add_executable(containers_check_frame_int check_frame_int.c)
+ target_link_libraries(containers_check_frame_int -Wl,--no-whole-archive containers)
+-install(TARGETS containers_check_frame_int DESTINATION bin)
++install(TARGETS containers_check_frame_int DESTINATION ${CMAKE_INSTALL_BINDIR})
+
+ # Generate autotest application
+ #add_executable(containers_autotest autotest.cpp crc_32.c)
+ #target_link_libraries(containers_autotest -Wl,--no-whole-archive containers})
+-#install(TARGETS containers_autotest DESTINATION bin)
++#install(TARGETS containers_autotest DESTINATION ${CMAKE_INSTALL_BINDIR})
+
+ # Helper code to provide non-blocking console input
+ if (WIN32)
+@@ -28,39 +28,39 @@ add_dependencies(containers_test containers_test_extra)
+ # Generate net test applications
+ add_executable(containers_stream_client stream_client.c ${NB_IO_SOURCE})
+ target_link_libraries(containers_stream_client containers)
+-install(TARGETS containers_stream_client DESTINATION bin)
++install(TARGETS containers_stream_client DESTINATION ${CMAKE_INSTALL_BINDIR})
+
+ add_executable(containers_stream_server stream_server.c)
+ target_link_libraries(containers_stream_server containers)
+-install(TARGETS containers_stream_server DESTINATION bin)
++install(TARGETS containers_stream_server DESTINATION ${CMAKE_INSTALL_BINDIR})
+
+ add_executable(containers_datagram_sender datagram_sender.c)
+ target_link_libraries(containers_datagram_sender containers)
+-install(TARGETS containers_datagram_sender DESTINATION bin)
++install(TARGETS containers_datagram_sender DESTINATION ${CMAKE_INSTALL_BINDIR})
+
+ add_executable(containers_datagram_receiver datagram_receiver.c)
+ target_link_libraries(containers_datagram_receiver containers)
+-install(TARGETS containers_datagram_receiver DESTINATION bin)
++install(TARGETS containers_datagram_receiver DESTINATION ${CMAKE_INSTALL_BINDIR})
+
+ add_executable(containers_rtp_decoder rtp_decoder.c ${NB_IO_SOURCE})
+ target_link_libraries(containers_rtp_decoder containers)
+-install(TARGETS containers_rtp_decoder DESTINATION bin)
++install(TARGETS containers_rtp_decoder DESTINATION ${CMAKE_INSTALL_BINDIR})
+
+ # Generate URI test application
+ add_executable(containers_test_uri test_uri.c)
+ target_link_libraries(containers_test_uri containers)
+-install(TARGETS containers_test_uri DESTINATION bin)
++install(TARGETS containers_test_uri DESTINATION ${CMAKE_INSTALL_BINDIR})
+
+ # Generate URI pipe application
+ add_executable(containers_uri_pipe uri_pipe.c ${NB_IO_SOURCE})
+ target_link_libraries(containers_uri_pipe containers)
+-install(TARGETS containers_uri_pipe DESTINATION bin)
++install(TARGETS containers_uri_pipe DESTINATION ${CMAKE_INSTALL_BINDIR})
+
+ # Generate bit stream test application
+ add_executable(containers_test_bits test_bits.c)
+ target_link_libraries(containers_test_bits containers)
+-install(TARGETS containers_test_bits DESTINATION bin)
++install(TARGETS containers_test_bits DESTINATION ${CMAKE_INSTALL_BINDIR})
+
+ # Generate packet file dump application
+ add_executable(containers_dump_pktfile dump_pktfile.c)
+-install(TARGETS containers_dump_pktfile DESTINATION bin)
++install(TARGETS containers_dump_pktfile DESTINATION ${CMAKE_INSTALL_BINDIR})
+diff --git a/helpers/dtoverlay/CMakeLists.txt b/helpers/dtoverlay/CMakeLists.txt
+index b3bd30f..7e83780 100644
+--- a/helpers/dtoverlay/CMakeLists.txt
++++ b/helpers/dtoverlay/CMakeLists.txt
+@@ -22,4 +22,4 @@ add_library (dtovl ${SHARED}
+
+ target_link_libraries(dtovl fdt)
+
+-install (TARGETS dtovl DESTINATION lib)
++install (TARGETS dtovl DESTINATION ${CMAKE_INSTALL_LIBDIR})
+diff --git a/host_applications/linux/apps/dtmerge/CMakeLists.txt b/host_applications/linux/apps/dtmerge/CMakeLists.txt
+index d3f7e36..daa91e5 100755
+--- a/host_applications/linux/apps/dtmerge/CMakeLists.txt
++++ b/host_applications/linux/apps/dtmerge/CMakeLists.txt
+@@ -17,5 +17,5 @@ include_directories (
+ add_executable(dtmerge dtmerge.c)
+ target_link_libraries(dtmerge dtovl)
+
+-install(TARGETS dtmerge RUNTIME DESTINATION bin)
++install(TARGETS dtmerge RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ install(FILES dtmerge.1 DESTINATION man/man1)
+diff --git a/host_applications/linux/apps/dtoverlay/CMakeLists.txt b/host_applications/linux/apps/dtoverlay/CMakeLists.txt
+index 97bcadc..238296d 100755
+--- a/host_applications/linux/apps/dtoverlay/CMakeLists.txt
++++ b/host_applications/linux/apps/dtoverlay/CMakeLists.txt
+@@ -16,12 +16,12 @@ include_directories (
+
+ add_executable(dtoverlay dtoverlay_main.c utils.c)
+ target_link_libraries(dtoverlay dtovl)
+-install(TARGETS dtoverlay RUNTIME DESTINATION bin)
++install(TARGETS dtoverlay RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ install(FILES dtoverlay.1 DESTINATION man/man1)
+
+ add_custom_command(TARGET dtoverlay POST_BUILD COMMAND ln;-sf;dtoverlay;dtparam)
+-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dtparam DESTINATION bin)
++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dtparam DESTINATION ${CMAKE_INSTALL_BINDIR})
+ install(FILES dtparam.1 DESTINATION man/man1)
+
+ set(DTOVERLAY_SCRIPTS dtoverlay-pre dtoverlay-post)
+-install(PROGRAMS ${DTOVERLAY_SCRIPTS} DESTINATION bin)
++install(PROGRAMS ${DTOVERLAY_SCRIPTS} DESTINATION ${CMAKE_INSTALL_BINDIR})
+diff --git a/host_applications/linux/apps/gencmd/CMakeLists.txt b/host_applications/linux/apps/gencmd/CMakeLists.txt
+index 0c2c32a..fdd2f00 100644
+--- a/host_applications/linux/apps/gencmd/CMakeLists.txt
++++ b/host_applications/linux/apps/gencmd/CMakeLists.txt
+@@ -16,5 +16,5 @@ include_directories( ../../../..
+
+ add_executable(vcgencmd gencmd.c)
+ target_link_libraries(vcgencmd vcos vchiq_arm vchostif)
+-install(TARGETS vcgencmd RUNTIME DESTINATION bin)
++install(TARGETS vcgencmd RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ install(FILES vcgencmd.1 DESTINATION man/man1)
+diff --git a/host_applications/linux/apps/hello_pi/hello_audio/CMakeLists.txt b/host_applications/linux/apps/hello_pi/hello_audio/CMakeLists.txt
+index 03207c5..8f4d06c 100644
+--- a/host_applications/linux/apps/hello_pi/hello_audio/CMakeLists.txt
++++ b/host_applications/linux/apps/hello_pi/hello_audio/CMakeLists.txt
+@@ -5,4 +5,4 @@ add_executable(${EXEC} ${SRCS})
+ target_link_libraries(${EXEC} ${HELLO_PI_LIBS})
+
+ install(TARGETS ${EXEC}
+- RUNTIME DESTINATION bin)
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+diff --git a/host_applications/linux/apps/hello_pi/hello_dispmanx/CMakeLists.txt b/host_applications/linux/apps/hello_pi/hello_dispmanx/CMakeLists.txt
+index 0471a1d..fd8b85e 100644
+--- a/host_applications/linux/apps/hello_pi/hello_dispmanx/CMakeLists.txt
++++ b/host_applications/linux/apps/hello_pi/hello_dispmanx/CMakeLists.txt
+@@ -5,4 +5,4 @@ add_executable(${EXEC} ${SRCS})
+ target_link_libraries(${EXEC} ${HELLO_PI_LIBS})
+
+ install(TARGETS ${EXEC}
+- RUNTIME DESTINATION bin)
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+diff --git a/host_applications/linux/apps/hello_pi/hello_encode/CMakeLists.txt b/host_applications/linux/apps/hello_pi/hello_encode/CMakeLists.txt
+index 147623b..98a197a 100644
+--- a/host_applications/linux/apps/hello_pi/hello_encode/CMakeLists.txt
++++ b/host_applications/linux/apps/hello_pi/hello_encode/CMakeLists.txt
+@@ -5,4 +5,4 @@ add_executable(${EXEC} ${SRCS})
+ target_link_libraries(${EXEC} ${HELLO_PI_LIBS})
+
+ install(TARGETS ${EXEC}
+- RUNTIME DESTINATION bin)
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+diff --git a/host_applications/linux/apps/hello_pi/hello_font/CMakeLists.txt b/host_applications/linux/apps/hello_pi/hello_font/CMakeLists.txt
+index 448d2cf..1d89f4c 100644
+--- a/host_applications/linux/apps/hello_pi/hello_font/CMakeLists.txt
++++ b/host_applications/linux/apps/hello_pi/hello_font/CMakeLists.txt
+@@ -6,4 +6,4 @@ target_link_libraries(${EXEC} ${HELLO_PI_LIBS})
+ target_link_libraries(${EXEC} vgfont freetype z)
+
+ install(TARGETS ${EXEC}
+- RUNTIME DESTINATION bin)
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+diff --git a/host_applications/linux/apps/hello_pi/hello_jpeg/CMakeLists.txt b/host_applications/linux/apps/hello_pi/hello_jpeg/CMakeLists.txt
+index a56dda5..f611f8e 100644
+--- a/host_applications/linux/apps/hello_pi/hello_jpeg/CMakeLists.txt
++++ b/host_applications/linux/apps/hello_pi/hello_jpeg/CMakeLists.txt
+@@ -5,4 +5,4 @@ add_executable(${EXEC} ${SRCS})
+ target_link_libraries(${EXEC} ${HELLO_PI_LIBS})
+
+ install(TARGETS ${EXEC}
+- RUNTIME DESTINATION bin)
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+diff --git a/host_applications/linux/apps/hello_pi/hello_teapot/CMakeLists.txt b/host_applications/linux/apps/hello_pi/hello_teapot/CMakeLists.txt
+index cdb8413..a60da3e 100644
+--- a/host_applications/linux/apps/hello_pi/hello_teapot/CMakeLists.txt
++++ b/host_applications/linux/apps/hello_pi/hello_teapot/CMakeLists.txt
+@@ -5,4 +5,4 @@ add_executable(${EXEC} ${SRCS})
+ target_link_libraries(${EXEC} ${HELLO_PI_LIBS})
+
+ install(TARGETS ${EXEC}
+- RUNTIME DESTINATION bin)
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+diff --git a/host_applications/linux/apps/hello_pi/hello_tiger/CMakeLists.txt b/host_applications/linux/apps/hello_pi/hello_tiger/CMakeLists.txt
+index b253f3f..1104a8b 100644
+--- a/host_applications/linux/apps/hello_pi/hello_tiger/CMakeLists.txt
++++ b/host_applications/linux/apps/hello_pi/hello_tiger/CMakeLists.txt
+@@ -6,4 +6,4 @@ add_executable(${EXEC} ${SRCS})
+ target_link_libraries(${EXEC} ${HELLO_PI_LIBS})
+
+ install(TARGETS ${EXEC}
+- RUNTIME DESTINATION bin)
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+diff --git a/host_applications/linux/apps/hello_pi/hello_triangle/CMakeLists.txt b/host_applications/linux/apps/hello_pi/hello_triangle/CMakeLists.txt
+index 4e8128e..4b738bb 100644
+--- a/host_applications/linux/apps/hello_pi/hello_triangle/CMakeLists.txt
++++ b/host_applications/linux/apps/hello_pi/hello_triangle/CMakeLists.txt
+@@ -5,4 +5,4 @@ add_executable(${EXEC} ${SRCS})
+ target_link_libraries(${EXEC} ${HELLO_PI_LIBS})
+
+ install(TARGETS ${EXEC}
+- RUNTIME DESTINATION bin)
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+diff --git a/host_applications/linux/apps/hello_pi/hello_triangle2/CMakeLists.txt b/host_applications/linux/apps/hello_pi/hello_triangle2/CMakeLists.txt
+index 390980a..c8c534f 100644
+--- a/host_applications/linux/apps/hello_pi/hello_triangle2/CMakeLists.txt
++++ b/host_applications/linux/apps/hello_pi/hello_triangle2/CMakeLists.txt
+@@ -5,4 +5,4 @@ add_executable(${EXEC} ${SRCS})
+ target_link_libraries(${EXEC} ${HELLO_PI_LIBS})
+
+ install(TARGETS ${EXEC}
+- RUNTIME DESTINATION bin)
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+diff --git a/host_applications/linux/apps/hello_pi/hello_video/CMakeLists.txt b/host_applications/linux/apps/hello_pi/hello_video/CMakeLists.txt
+index 42187af..6b15ca2 100644
+--- a/host_applications/linux/apps/hello_pi/hello_video/CMakeLists.txt
++++ b/host_applications/linux/apps/hello_pi/hello_video/CMakeLists.txt
+@@ -5,4 +5,4 @@ add_executable(${EXEC} ${SRCS})
+ target_link_libraries(${EXEC} ${HELLO_PI_LIBS})
+
+ install(TARGETS ${EXEC}
+- RUNTIME DESTINATION bin)
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+diff --git a/host_applications/linux/apps/hello_pi/hello_videocube/CMakeLists.txt b/host_applications/linux/apps/hello_pi/hello_videocube/CMakeLists.txt
+index d7fb059..9612ffe 100644
+--- a/host_applications/linux/apps/hello_pi/hello_videocube/CMakeLists.txt
++++ b/host_applications/linux/apps/hello_pi/hello_videocube/CMakeLists.txt
+@@ -5,4 +5,4 @@ add_executable(${EXEC} ${SRCS})
+ target_link_libraries(${EXEC} ${HELLO_PI_LIBS})
+
+ install(TARGETS ${EXEC}
+- RUNTIME DESTINATION bin)
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+diff --git a/host_applications/linux/apps/hello_pi/hello_wayland/CMakeLists.txt b/host_applications/linux/apps/hello_pi/hello_wayland/CMakeLists.txt
+index 9a2f75c..9a468a6 100644
+--- a/host_applications/linux/apps/hello_pi/hello_wayland/CMakeLists.txt
++++ b/host_applications/linux/apps/hello_pi/hello_wayland/CMakeLists.txt
+@@ -5,4 +5,4 @@ add_executable(${EXEC} ${SRCS})
+ target_link_libraries(${EXEC} ${HELLO_PI_LIBS} -lwayland-client -lwayland-egl)
+
+ install(TARGETS ${EXEC}
+- RUNTIME DESTINATION bin)
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+diff --git a/host_applications/linux/apps/hello_pi/hello_world/CMakeLists.txt b/host_applications/linux/apps/hello_pi/hello_world/CMakeLists.txt
+index b0120fe..97d90f6 100644
+--- a/host_applications/linux/apps/hello_pi/hello_world/CMakeLists.txt
++++ b/host_applications/linux/apps/hello_pi/hello_world/CMakeLists.txt
+@@ -5,4 +5,4 @@ add_executable(${EXEC} ${SRCS})
+ target_link_libraries(${EXEC} ${HELLO_PI_LIBS})
+
+ install(TARGETS ${EXEC}
+- RUNTIME DESTINATION bin)
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+diff --git a/host_applications/linux/apps/raspicam/CMakeLists.txt b/host_applications/linux/apps/raspicam/CMakeLists.txt
+index f73a4d0..4a9cd88 100644
+--- a/host_applications/linux/apps/raspicam/CMakeLists.txt
++++ b/host_applications/linux/apps/raspicam/CMakeLists.txt
+@@ -66,6 +66,6 @@ target_link_libraries(raspiyuv ${MMAL_LIBS} vcos bcm_host m)
+ target_link_libraries(raspivid ${MMAL_LIBS} vcos bcm_host m)
+ target_link_libraries(raspividyuv ${MMAL_LIBS} vcos bcm_host m)
+
+-install(TARGETS raspistill raspiyuv raspivid raspividyuv RUNTIME DESTINATION bin)
++install(TARGETS raspistill raspiyuv raspivid raspividyuv RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ install(FILES raspistill.1 raspiyuv.1 raspivid.1 raspividyuv.1 DESTINATION man/man1)
+ install(FILES raspicam.7 DESTINATION man/man7)
+diff --git a/host_applications/linux/apps/smem/CMakeLists.txt b/host_applications/linux/apps/smem/CMakeLists.txt
+index 0fa8328..60c9c61 100644
+--- a/host_applications/linux/apps/smem/CMakeLists.txt
++++ b/host_applications/linux/apps/smem/CMakeLists.txt
+@@ -16,5 +16,5 @@ include_directories (
+ add_executable(vcsmem smem.c)
+ target_link_libraries(vcsmem vcos vcsm vchostif)
+
+-install(TARGETS vcsmem RUNTIME DESTINATION bin)
++install(TARGETS vcsmem RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+
+diff --git a/host_applications/linux/apps/tvservice/CMakeLists.txt b/host_applications/linux/apps/tvservice/CMakeLists.txt
+index 0190774..fad5a6b 100644
+--- a/host_applications/linux/apps/tvservice/CMakeLists.txt
++++ b/host_applications/linux/apps/tvservice/CMakeLists.txt
+@@ -3,5 +3,5 @@ add_executable(tvservice tvservice.c)
+ target_link_libraries(tvservice vchostif bcm_host)
+
+ install(TARGETS tvservice
+- RUNTIME DESTINATION bin)
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ install(FILES tvservice.1 DESTINATION man/man1)
+diff --git a/host_applications/linux/apps/vcmailbox/CMakeLists.txt b/host_applications/linux/apps/vcmailbox/CMakeLists.txt
+index d153363..2731724 100644
+--- a/host_applications/linux/apps/vcmailbox/CMakeLists.txt
++++ b/host_applications/linux/apps/vcmailbox/CMakeLists.txt
+@@ -2,6 +2,6 @@ add_executable(vcmailbox vcmailbox.c)
+ target_link_libraries(vcmailbox vchostif)
+
+ install(TARGETS vcmailbox
+- RUNTIME DESTINATION bin)
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ install(FILES vcmailbox.1 DESTINATION man/man1)
+ install(FILES vcmailbox.7 raspiotp.7 raspirev.7 DESTINATION man/man7)
+diff --git a/host_applications/linux/libs/bcm_host/CMakeLists.txt b/host_applications/linux/libs/bcm_host/CMakeLists.txt
+index 7a4ab06..3614943 100644
+--- a/host_applications/linux/libs/bcm_host/CMakeLists.txt
++++ b/host_applications/linux/libs/bcm_host/CMakeLists.txt
+@@ -19,5 +19,5 @@ add_library(bcm_host ${SHARED} bcm_host.c)
+
+ target_link_libraries(bcm_host vcos vchostif)
+
+-install(TARGETS bcm_host DESTINATION lib)
++install(TARGETS bcm_host DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
+diff --git a/host_applications/linux/libs/debug_sym/CMakeLists.txt b/host_applications/linux/libs/debug_sym/CMakeLists.txt
+index d437b99..37eb759 100644
+--- a/host_applications/linux/libs/debug_sym/CMakeLists.txt
++++ b/host_applications/linux/libs/debug_sym/CMakeLists.txt
+@@ -11,6 +11,6 @@ include_directories (
+ add_library(debug_sym ${SHARED} debug_sym.c)
+ add_library(debug_sym_static STATIC debug_sym.c)
+
+-install(TARGETS debug_sym DESTINATION lib)
+-install(TARGETS debug_sym_static DESTINATION lib)
+-install(FILES debug_sym.h DESTINATION include/interface/debug_sym)
++install(TARGETS debug_sym DESTINATION ${CMAKE_INSTALL_LIBDIR})
++install(TARGETS debug_sym_static DESTINATION ${CMAKE_INSTALL_LIBDIR})
++install(FILES debug_sym.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/interface/debug_sym)
+diff --git a/host_applications/linux/libs/sm/CMakeLists.txt b/host_applications/linux/libs/sm/CMakeLists.txt
+index 5ce5aca..84d8123 100644
+--- a/host_applications/linux/libs/sm/CMakeLists.txt
++++ b/host_applications/linux/libs/sm/CMakeLists.txt
+@@ -14,5 +14,5 @@ add_library(vcsm ${SHARED} user-vcsm.c)
+
+ target_link_libraries(vcsm vcos)
+
+-install(TARGETS vcsm DESTINATION lib)
+-install(FILES user-vcsm.h DESTINATION include/interface/vcsm)
++install(TARGETS vcsm DESTINATION ${CMAKE_INSTALL_LIBDIR})
++install(FILES user-vcsm.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/interface/vcsm)
+diff --git a/interface/khronos/CMakeLists.txt b/interface/khronos/CMakeLists.txt
+index 95c0e11..00316a5 100644
+--- a/interface/khronos/CMakeLists.txt
++++ b/interface/khronos/CMakeLists.txt
+@@ -94,11 +94,11 @@ if (BUILD_WAYLAND)
+ )
+
+ add_library(wayland-egl ${SHARED} ${WAYLAND_EGL_SOURCE})
+- install(TARGETS wayland-egl DESTINATION lib)
++ install(TARGETS wayland-egl DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
+ configure_file ("wayland-egl/wayland-egl.pc.in" "wayland-egl/wayland-egl.pc" @ONLY)
+ install (FILES "${CMAKE_CURRENT_BINARY_DIR}/wayland-egl/wayland-egl.pc"
+- DESTINATION lib/pkgconfig)
++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+ endif ()
+
+ add_library(EGL ${SHARED} ${EGL_SOURCE})
+@@ -126,8 +126,8 @@ target_link_libraries(GLESv2 EGL khrn_client vcos)
+ target_link_libraries(WFC EGL)
+ target_link_libraries(OpenVG EGL)
+
+-install(TARGETS EGL GLESv2 OpenVG WFC khrn_client DESTINATION lib)
+-install(TARGETS EGL_static GLESv2_static khrn_static DESTINATION lib)
++install(TARGETS EGL GLESv2 OpenVG WFC khrn_client DESTINATION ${CMAKE_INSTALL_LIBDIR})
++install(TARGETS EGL_static GLESv2_static khrn_static DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
+ # recommended names to use to avoid conflicts with mesa libs
+ add_library(brcmEGL ${SHARED} ${EGL_SOURCE})
+@@ -140,4 +140,4 @@ target_link_libraries(brcmGLESv2 brcmEGL khrn_client vcos)
+ target_link_libraries(brcmWFC brcmEGL)
+ target_link_libraries(brcmOpenVG brcmEGL)
+
+-install(TARGETS brcmEGL brcmGLESv2 brcmOpenVG brcmWFC DESTINATION lib)
++install(TARGETS brcmEGL brcmGLESv2 brcmOpenVG brcmWFC DESTINATION ${CMAKE_INSTALL_LIBDIR})
+diff --git a/interface/mmal/CMakeLists.txt b/interface/mmal/CMakeLists.txt
+index c5c1642..fe784e8 100644
+--- a/interface/mmal/CMakeLists.txt
++++ b/interface/mmal/CMakeLists.txt
+@@ -16,7 +16,7 @@ add_subdirectory(client)
+
+ target_link_libraries(mmal mmal_core mmal_util mmal_vc_client vcos mmal_components)
+
+-install(TARGETS mmal DESTINATION lib)
++install(TARGETS mmal DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ install(FILES
+ mmal.h
+ mmal_buffer.h
+@@ -36,7 +36,7 @@ install(FILES
+ mmal_pool.h mmal_port.h
+ mmal_queue.h
+ mmal_types.h
+- DESTINATION include/interface/mmal
++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/interface/mmal
+ )
+
+ # Test apps
+diff --git a/interface/mmal/components/CMakeLists.txt b/interface/mmal/components/CMakeLists.txt
+index d65fa37..4c85de0 100644
+--- a/interface/mmal/components/CMakeLists.txt
++++ b/interface/mmal/components/CMakeLists.txt
+@@ -30,5 +30,5 @@ set(container_libs ${container_libs} containers)
+ target_link_libraries(mmal_components ${container_libs} mmal_util)
+ target_link_libraries(mmal_components mmal_core)
+
+-install(TARGETS mmal_components DESTINATION lib)
++install(TARGETS mmal_components DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
+diff --git a/interface/mmal/core/CMakeLists.txt b/interface/mmal/core/CMakeLists.txt
+index efa14d9..4fe0779 100644
+--- a/interface/mmal/core/CMakeLists.txt
++++ b/interface/mmal/core/CMakeLists.txt
+@@ -13,7 +13,7 @@ add_library (mmal_core ${LIBRARY_TYPE}
+
+ target_link_libraries (mmal_core vcos mmal_vc_client)
+
+-install(TARGETS mmal_core DESTINATION lib)
++install(TARGETS mmal_core DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ install(FILES
+ mmal_buffer_private.h
+ mmal_clock_private.h
+@@ -21,5 +21,5 @@ install(FILES
+ mmal_core_private.h
+ mmal_port_private.h
+ mmal_events_private.h
+- DESTINATION include/interface/mmal/core
++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/interface/mmal/core
+ )
+diff --git a/interface/mmal/util/CMakeLists.txt b/interface/mmal/util/CMakeLists.txt
+index b2a6858..e51afd0 100644
+--- a/interface/mmal/util/CMakeLists.txt
++++ b/interface/mmal/util/CMakeLists.txt
+@@ -12,7 +12,7 @@ add_library (mmal_util ${LIBRARY_TYPE}
+
+ target_link_libraries (mmal_util vcos)
+
+-install(TARGETS mmal_util DESTINATION lib)
++install(TARGETS mmal_util DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ install(FILES
+ mmal_component_wrapper.h
+ mmal_connection.h
+@@ -24,5 +24,5 @@ install(FILES
+ mmal_util.h
+ mmal_util_params.h
+ mmal_util_rational.h
+- DESTINATION include/interface/mmal/util
++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/interface/mmal/util
+ )
+diff --git a/interface/mmal/vc/CMakeLists.txt b/interface/mmal/vc/CMakeLists.txt
+index d6e80db..3b9ec64 100644
+--- a/interface/mmal/vc/CMakeLists.txt
++++ b/interface/mmal/vc/CMakeLists.txt
+@@ -8,12 +8,12 @@ target_link_libraries(mmal_vc_client vchiq_arm vcos vcsm)
+ if(BUILD_MMAL_APPS)
+ add_executable(mmal_vc_diag mmal_vc_diag.c)
+ target_link_libraries(mmal_vc_diag mmal mmal_vc_client debug_sym vcos)
+-install(TARGETS mmal_vc_diag RUNTIME DESTINATION bin)
++install(TARGETS mmal_vc_diag RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ endif(BUILD_MMAL_APPS)
+
+ include_directories ( ../../../host_applications/linux/libs/sm )
+
+-install(TARGETS mmal_vc_client DESTINATION lib)
++install(TARGETS mmal_vc_client DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ install(FILES
+ mmal_vc_api.h
+ mmal_vc_api_drm.h
+@@ -22,5 +22,5 @@ install(FILES
+ mmal_vc_msgs.h
+ mmal_vc_opaque_alloc.h
+ mmal_vc_shm.h
+- DESTINATION include/interface/mmal/vc
++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/interface/mmal/vc
+ )
+diff --git a/interface/vchiq_arm/CMakeLists.txt b/interface/vchiq_arm/CMakeLists.txt
+index 7af383d..e5a3224 100644
+--- a/interface/vchiq_arm/CMakeLists.txt
++++ b/interface/vchiq_arm/CMakeLists.txt
+@@ -5,7 +5,7 @@ add_library(vchiq_arm SHARED
+ # pull in VCHI cond variable emulation
+ target_link_libraries(vchiq_arm vcos)
+
+-install(TARGETS vchiq_arm DESTINATION lib)
++install(TARGETS vchiq_arm DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ #install(FILES etc/10-vchiq.rules DESTINATION /etc/udev/rules.d)
+
+ include_directories(../..)
+@@ -17,4 +17,4 @@ target_link_libraries(vchiq_test
+ vchiq_arm
+ vcos)
+
+-install(TARGETS vchiq_test RUNTIME DESTINATION bin)
++install(TARGETS vchiq_test RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+diff --git a/interface/vcos/CMakeLists.txt b/interface/vcos/CMakeLists.txt
+index 23a8d72..b0924a4 100644
+--- a/interface/vcos/CMakeLists.txt
++++ b/interface/vcos/CMakeLists.txt
+@@ -65,4 +65,4 @@ if (WIN32)
+ configure_file (build_all.bat.in build_all.bat @ONLY)
+ endif ()
+
+-#install (FILES ${HEADERS} DESTINATION include/interface/vcos)
++#install (FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/interface/vcos)
+diff --git a/interface/vcos/generic/CMakeLists.txt b/interface/vcos/generic/CMakeLists.txt
+index c09f376..8af98fd 100644
+--- a/interface/vcos/generic/CMakeLists.txt
++++ b/interface/vcos/generic/CMakeLists.txt
+@@ -18,4 +18,4 @@ foreach (header ${HEADERS})
+ configure_file ("${header}" "${VCOS_HEADERS_BUILD_DIR}/generic/${header}" COPYONLY)
+ endforeach ()
+
+-install (FILES ${HEADERS} DESTINATION include/interface/vcos/generic)
++install (FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/interface/vcos/generic)
+diff --git a/interface/vcos/pthreads/CMakeLists.txt b/interface/vcos/pthreads/CMakeLists.txt
+index d6cd415..821b3f3 100644
+--- a/interface/vcos/pthreads/CMakeLists.txt
++++ b/interface/vcos/pthreads/CMakeLists.txt
+@@ -50,5 +50,5 @@ else ()
+ endif ()
+
+
+-#install(FILES ${HEADERS} DESTINATION include)
+-install(TARGETS vcos DESTINATION lib)
++#install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_LIBDIR})
++install(TARGETS vcos DESTINATION ${CMAKE_INSTALL_LIBDIR})
+diff --git a/interface/vmcs_host/CMakeLists.txt b/interface/vmcs_host/CMakeLists.txt
+index 76813c9..0984d8a 100755
+--- a/interface/vmcs_host/CMakeLists.txt
++++ b/interface/vmcs_host/CMakeLists.txt
+@@ -35,5 +35,5 @@ target_link_libraries(vchostif vchiq_arm vcos)
+
+ #target_link_libraries(bufman WFC)
+
+-install(TARGETS ${INSTALL_TARGETS} DESTINATION lib)
++install(TARGETS ${INSTALL_TARGETS} DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
+diff --git a/makefiles/cmake/vmcs.cmake b/makefiles/cmake/vmcs.cmake
+index 7c97463..a1eb911 100644
+--- a/makefiles/cmake/vmcs.cmake
++++ b/makefiles/cmake/vmcs.cmake
+@@ -16,7 +16,7 @@ endif()
+ SET(CMAKE_INSTALL_PREFIX "${VMCS_INSTALL_PREFIX}" CACHE INTERNAL "Prefix
+ prepended to install directories" FORCE)
+ if(NOT DEFINED VMCS_PLUGIN_DIR)
+- SET(VMCS_PLUGIN_DIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_SHARED_LIBRARY_PREFIX}/plugins)
++ SET(VMCS_PLUGIN_DIR ${CMAKE_INSTALL_LIBDIR}/plugins)
+ endif()
+
+ # What kind of system are we?
+diff --git a/middleware/openmaxil/CMakeLists.txt b/middleware/openmaxil/CMakeLists.txt
+index 3e9c5f9..c063740 100644
+--- a/middleware/openmaxil/CMakeLists.txt
++++ b/middleware/openmaxil/CMakeLists.txt
+@@ -49,4 +49,4 @@ else ()
+
+ endif ()
+
+-install (TARGETS openmaxil DESTINATION lib)
++install (TARGETS openmaxil DESTINATION ${CMAKE_INSTALL_LIBDIR})
+diff --git a/pkgconfig/bcm_host.pc.in b/pkgconfig/bcm_host.pc.in
+index c7237c5..2988b42 100644
+--- a/pkgconfig/bcm_host.pc.in
++++ b/pkgconfig/bcm_host.pc.in
+@@ -1,6 +1,6 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=${prefix}
+-libdir=${exec_prefix}/lib
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+ includedir=${prefix}/include
+
+ Name: bcm_host
+diff --git a/pkgconfig/brcmegl.pc.in b/pkgconfig/brcmegl.pc.in
+index 5dd3d5b..a45bf22 100644
+--- a/pkgconfig/brcmegl.pc.in
++++ b/pkgconfig/brcmegl.pc.in
+@@ -1,6 +1,6 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=${prefix}
+-libdir=${exec_prefix}/lib
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+ includedir=${prefix}/include
+
+ Name: brcmEGL
+diff --git a/pkgconfig/brcmglesv2.pc.in b/pkgconfig/brcmglesv2.pc.in
+index e0e36f5..902fbf3 100644
+--- a/pkgconfig/brcmglesv2.pc.in
++++ b/pkgconfig/brcmglesv2.pc.in
+@@ -1,6 +1,6 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=${prefix}
+-libdir=${exec_prefix}/lib
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+ includedir=${prefix}/include
+
+ Name: brcmGLESv2
+diff --git a/pkgconfig/brcmvg.pc.in b/pkgconfig/brcmvg.pc.in
+index 763a44b..98489ee 100644
+--- a/pkgconfig/brcmvg.pc.in
++++ b/pkgconfig/brcmvg.pc.in
+@@ -1,6 +1,6 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=${prefix}
+-libdir=${exec_prefix}/lib
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+ includedir=${prefix}/include
+
+ Name: brcmOpenVG
+diff --git a/pkgconfig/mmal.pc.in b/pkgconfig/mmal.pc.in
+index 37d344c..1ffa4f5 100644
+--- a/pkgconfig/mmal.pc.in
++++ b/pkgconfig/mmal.pc.in
+@@ -1,6 +1,6 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=${prefix}
+-libdir=${exec_prefix}/lib
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+ includedir=${prefix}/include
+
+ Name: MMAL
+diff --git a/pkgconfig/vcsm.pc.in b/pkgconfig/vcsm.pc.in
+index b12c56f..6f762cb 100644
+--- a/pkgconfig/vcsm.pc.in
++++ b/pkgconfig/vcsm.pc.in
+@@ -1,6 +1,6 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=${prefix}
+-libdir=${exec_prefix}/lib
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+ includedir=${prefix}/include
+
+ Name: VCSM