1From 8f7fba136391e2020cd0fc9dca76932d3faa21eb Mon Sep 17 00:00:00 2001 2From: Martin Jansa <martin.jansa@gmail.com> 3Date: Fri, 8 Mar 2024 16:29:22 +0100 4Subject: [PATCH] CMakeLists.txt, *.pc: respect CMAKE_INSTALL_LIBDIR 5 6* and CMAKE_INSTALL_BINDIR, CMAKE_INSTALL_INCLUDEDIR as well 7* fixes installation paths with multilib 8 lib32-userland fails with: 9 10ERROR: QA Issue: lib32-userland: Files/directories were installed but not shipped in any package: 11 /usr/lib/libbrcmEGL.so 12 /usr/lib/libvchiq_arm.so 13... 14 /usr/lib/pkgconfig/wayland-egl.pc 15Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install. 16lib32-userland: 66 installed and not shipped files. [installed-vs-shipped] 17 18Signed-off-by: Martin Jansa <martin.jansa@gmail.com> 19--- 20Upstream-Status: Pending 21 22 CMakeLists.txt | 2 +- 23 containers/CMakeLists.txt | 2 +- 24 containers/test/CMakeLists.txt | 24 +++++++++---------- 25 helpers/dtoverlay/CMakeLists.txt | 2 +- 26 .../linux/apps/dtmerge/CMakeLists.txt | 2 +- 27 .../linux/apps/dtoverlay/CMakeLists.txt | 6 ++--- 28 .../linux/apps/gencmd/CMakeLists.txt | 2 +- 29 .../apps/hello_pi/hello_audio/CMakeLists.txt | 2 +- 30 .../hello_pi/hello_dispmanx/CMakeLists.txt | 2 +- 31 .../apps/hello_pi/hello_encode/CMakeLists.txt | 2 +- 32 .../apps/hello_pi/hello_font/CMakeLists.txt | 2 +- 33 .../apps/hello_pi/hello_jpeg/CMakeLists.txt | 2 +- 34 .../apps/hello_pi/hello_teapot/CMakeLists.txt | 2 +- 35 .../apps/hello_pi/hello_tiger/CMakeLists.txt | 2 +- 36 .../hello_pi/hello_triangle/CMakeLists.txt | 2 +- 37 .../hello_pi/hello_triangle2/CMakeLists.txt | 2 +- 38 .../apps/hello_pi/hello_video/CMakeLists.txt | 2 +- 39 .../hello_pi/hello_videocube/CMakeLists.txt | 2 +- 40 .../hello_pi/hello_wayland/CMakeLists.txt | 2 +- 41 .../apps/hello_pi/hello_world/CMakeLists.txt | 2 +- 42 .../linux/apps/raspicam/CMakeLists.txt | 2 +- 43 .../linux/apps/smem/CMakeLists.txt | 2 +- 44 .../linux/apps/tvservice/CMakeLists.txt | 2 +- 45 .../linux/apps/vcmailbox/CMakeLists.txt | 2 +- 46 .../linux/libs/bcm_host/CMakeLists.txt | 2 +- 47 .../linux/libs/debug_sym/CMakeLists.txt | 6 ++--- 48 .../linux/libs/sm/CMakeLists.txt | 4 ++-- 49 interface/khronos/CMakeLists.txt | 10 ++++---- 50 interface/mmal/CMakeLists.txt | 4 ++-- 51 interface/mmal/components/CMakeLists.txt | 2 +- 52 interface/mmal/core/CMakeLists.txt | 4 ++-- 53 interface/mmal/util/CMakeLists.txt | 4 ++-- 54 interface/mmal/vc/CMakeLists.txt | 6 ++--- 55 interface/vchiq_arm/CMakeLists.txt | 4 ++-- 56 interface/vcos/CMakeLists.txt | 2 +- 57 interface/vcos/generic/CMakeLists.txt | 2 +- 58 interface/vcos/pthreads/CMakeLists.txt | 4 ++-- 59 interface/vmcs_host/CMakeLists.txt | 2 +- 60 makefiles/cmake/vmcs.cmake | 2 +- 61 middleware/openmaxil/CMakeLists.txt | 2 +- 62 pkgconfig/bcm_host.pc.in | 2 +- 63 pkgconfig/brcmegl.pc.in | 2 +- 64 pkgconfig/brcmglesv2.pc.in | 2 +- 65 pkgconfig/brcmvg.pc.in | 2 +- 66 pkgconfig/mmal.pc.in | 2 +- 67 pkgconfig/vcsm.pc.in | 2 +- 68 46 files changed, 73 insertions(+), 73 deletions(-) 69 70diff --git a/CMakeLists.txt b/CMakeLists.txt 71index 3e3c90e..0bb54b7 100644 72--- a/CMakeLists.txt 73+++ b/CMakeLists.txt 74@@ -136,7 +136,7 @@ if(PKG_CONFIG_FOUND) 75 foreach(PCFILE bcm_host.pc brcmegl.pc brcmglesv2.pc brcmvg.pc vcsm.pc mmal.pc openmaxil.pc) 76 configure_file("pkgconfig/${PCFILE}.in" "${PCFILE}" @ONLY) 77 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PCFILE}" 78- DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig") 79+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") 80 endforeach() 81 endif() 82 # Remove cache entry, if one added by command line 83diff --git a/containers/CMakeLists.txt b/containers/CMakeLists.txt 84index 5570038..6c3d39c 100644 85--- a/containers/CMakeLists.txt 86+++ b/containers/CMakeLists.txt 87@@ -66,7 +66,7 @@ set(packetizers_SRCS ${packetizers_SRCS} ${SOURCE_DIR}/h264/avc1_packetizer.c) 88 89 add_library(containers ${LIBRARY_TYPE} ${core_SRCS} ${io_SRCS} ${net_SRCS} ${packetizers_SRCS}) 90 target_link_libraries(containers vcos) 91-install(TARGETS containers DESTINATION lib) 92+install(TARGETS containers DESTINATION ${CMAKE_INSTALL_LIBDIR}) 93 94 set(container_readers) 95 set(container_writers) 96diff --git a/containers/test/CMakeLists.txt b/containers/test/CMakeLists.txt 97index 7d36352..832ad0f 100644 98--- a/containers/test/CMakeLists.txt 99+++ b/containers/test/CMakeLists.txt 100@@ -1,17 +1,17 @@ 101 # Generate test application 102 add_executable(containers_test test.c) 103 target_link_libraries(containers_test -Wl,--no-whole-archive containers) 104-install(TARGETS containers_test DESTINATION bin) 105+install(TARGETS containers_test DESTINATION ${CMAKE_INSTALL_BINDIR}) 106 107 # Generate test application 108 add_executable(containers_check_frame_int check_frame_int.c) 109 target_link_libraries(containers_check_frame_int -Wl,--no-whole-archive containers) 110-install(TARGETS containers_check_frame_int DESTINATION bin) 111+install(TARGETS containers_check_frame_int DESTINATION ${CMAKE_INSTALL_BINDIR}) 112 113 # Generate autotest application 114 #add_executable(containers_autotest autotest.cpp crc_32.c) 115 #target_link_libraries(containers_autotest -Wl,--no-whole-archive containers}) 116-#install(TARGETS containers_autotest DESTINATION bin) 117+#install(TARGETS containers_autotest DESTINATION ${CMAKE_INSTALL_BINDIR}) 118 119 # Helper code to provide non-blocking console input 120 if (WIN32) 121@@ -28,39 +28,39 @@ add_dependencies(containers_test containers_test_extra) 122 # Generate net test applications 123 add_executable(containers_stream_client stream_client.c ${NB_IO_SOURCE}) 124 target_link_libraries(containers_stream_client containers) 125-install(TARGETS containers_stream_client DESTINATION bin) 126+install(TARGETS containers_stream_client DESTINATION ${CMAKE_INSTALL_BINDIR}) 127 128 add_executable(containers_stream_server stream_server.c) 129 target_link_libraries(containers_stream_server containers) 130-install(TARGETS containers_stream_server DESTINATION bin) 131+install(TARGETS containers_stream_server DESTINATION ${CMAKE_INSTALL_BINDIR}) 132 133 add_executable(containers_datagram_sender datagram_sender.c) 134 target_link_libraries(containers_datagram_sender containers) 135-install(TARGETS containers_datagram_sender DESTINATION bin) 136+install(TARGETS containers_datagram_sender DESTINATION ${CMAKE_INSTALL_BINDIR}) 137 138 add_executable(containers_datagram_receiver datagram_receiver.c) 139 target_link_libraries(containers_datagram_receiver containers) 140-install(TARGETS containers_datagram_receiver DESTINATION bin) 141+install(TARGETS containers_datagram_receiver DESTINATION ${CMAKE_INSTALL_BINDIR}) 142 143 add_executable(containers_rtp_decoder rtp_decoder.c ${NB_IO_SOURCE}) 144 target_link_libraries(containers_rtp_decoder containers) 145-install(TARGETS containers_rtp_decoder DESTINATION bin) 146+install(TARGETS containers_rtp_decoder DESTINATION ${CMAKE_INSTALL_BINDIR}) 147 148 # Generate URI test application 149 add_executable(containers_test_uri test_uri.c) 150 target_link_libraries(containers_test_uri containers) 151-install(TARGETS containers_test_uri DESTINATION bin) 152+install(TARGETS containers_test_uri DESTINATION ${CMAKE_INSTALL_BINDIR}) 153 154 # Generate URI pipe application 155 add_executable(containers_uri_pipe uri_pipe.c ${NB_IO_SOURCE}) 156 target_link_libraries(containers_uri_pipe containers) 157-install(TARGETS containers_uri_pipe DESTINATION bin) 158+install(TARGETS containers_uri_pipe DESTINATION ${CMAKE_INSTALL_BINDIR}) 159 160 # Generate bit stream test application 161 add_executable(containers_test_bits test_bits.c) 162 target_link_libraries(containers_test_bits containers) 163-install(TARGETS containers_test_bits DESTINATION bin) 164+install(TARGETS containers_test_bits DESTINATION ${CMAKE_INSTALL_BINDIR}) 165 166 # Generate packet file dump application 167 add_executable(containers_dump_pktfile dump_pktfile.c) 168-install(TARGETS containers_dump_pktfile DESTINATION bin) 169+install(TARGETS containers_dump_pktfile DESTINATION ${CMAKE_INSTALL_BINDIR}) 170diff --git a/helpers/dtoverlay/CMakeLists.txt b/helpers/dtoverlay/CMakeLists.txt 171index b3bd30f..7e83780 100644 172--- a/helpers/dtoverlay/CMakeLists.txt 173+++ b/helpers/dtoverlay/CMakeLists.txt 174@@ -22,4 +22,4 @@ add_library (dtovl ${SHARED} 175 176 target_link_libraries(dtovl fdt) 177 178-install (TARGETS dtovl DESTINATION lib) 179+install (TARGETS dtovl DESTINATION ${CMAKE_INSTALL_LIBDIR}) 180diff --git a/host_applications/linux/apps/dtmerge/CMakeLists.txt b/host_applications/linux/apps/dtmerge/CMakeLists.txt 181index d3f7e36..daa91e5 100755 182--- a/host_applications/linux/apps/dtmerge/CMakeLists.txt 183+++ b/host_applications/linux/apps/dtmerge/CMakeLists.txt 184@@ -17,5 +17,5 @@ include_directories ( 185 add_executable(dtmerge dtmerge.c) 186 target_link_libraries(dtmerge dtovl) 187 188-install(TARGETS dtmerge RUNTIME DESTINATION bin) 189+install(TARGETS dtmerge RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 190 install(FILES dtmerge.1 DESTINATION man/man1) 191diff --git a/host_applications/linux/apps/dtoverlay/CMakeLists.txt b/host_applications/linux/apps/dtoverlay/CMakeLists.txt 192index 97bcadc..238296d 100755 193--- a/host_applications/linux/apps/dtoverlay/CMakeLists.txt 194+++ b/host_applications/linux/apps/dtoverlay/CMakeLists.txt 195@@ -16,12 +16,12 @@ include_directories ( 196 197 add_executable(dtoverlay dtoverlay_main.c utils.c) 198 target_link_libraries(dtoverlay dtovl) 199-install(TARGETS dtoverlay RUNTIME DESTINATION bin) 200+install(TARGETS dtoverlay RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 201 install(FILES dtoverlay.1 DESTINATION man/man1) 202 203 add_custom_command(TARGET dtoverlay POST_BUILD COMMAND ln;-sf;dtoverlay;dtparam) 204-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dtparam DESTINATION bin) 205+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dtparam DESTINATION ${CMAKE_INSTALL_BINDIR}) 206 install(FILES dtparam.1 DESTINATION man/man1) 207 208 set(DTOVERLAY_SCRIPTS dtoverlay-pre dtoverlay-post) 209-install(PROGRAMS ${DTOVERLAY_SCRIPTS} DESTINATION bin) 210+install(PROGRAMS ${DTOVERLAY_SCRIPTS} DESTINATION ${CMAKE_INSTALL_BINDIR}) 211diff --git a/host_applications/linux/apps/gencmd/CMakeLists.txt b/host_applications/linux/apps/gencmd/CMakeLists.txt 212index 0c2c32a..fdd2f00 100644 213--- a/host_applications/linux/apps/gencmd/CMakeLists.txt 214+++ b/host_applications/linux/apps/gencmd/CMakeLists.txt 215@@ -16,5 +16,5 @@ include_directories( ../../../.. 216 217 add_executable(vcgencmd gencmd.c) 218 target_link_libraries(vcgencmd vcos vchiq_arm vchostif) 219-install(TARGETS vcgencmd RUNTIME DESTINATION bin) 220+install(TARGETS vcgencmd RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 221 install(FILES vcgencmd.1 DESTINATION man/man1) 222diff --git a/host_applications/linux/apps/hello_pi/hello_audio/CMakeLists.txt b/host_applications/linux/apps/hello_pi/hello_audio/CMakeLists.txt 223index 03207c5..8f4d06c 100644 224--- a/host_applications/linux/apps/hello_pi/hello_audio/CMakeLists.txt 225+++ b/host_applications/linux/apps/hello_pi/hello_audio/CMakeLists.txt 226@@ -5,4 +5,4 @@ add_executable(${EXEC} ${SRCS}) 227 target_link_libraries(${EXEC} ${HELLO_PI_LIBS}) 228 229 install(TARGETS ${EXEC} 230- RUNTIME DESTINATION bin) 231+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 232diff --git a/host_applications/linux/apps/hello_pi/hello_dispmanx/CMakeLists.txt b/host_applications/linux/apps/hello_pi/hello_dispmanx/CMakeLists.txt 233index 0471a1d..fd8b85e 100644 234--- a/host_applications/linux/apps/hello_pi/hello_dispmanx/CMakeLists.txt 235+++ b/host_applications/linux/apps/hello_pi/hello_dispmanx/CMakeLists.txt 236@@ -5,4 +5,4 @@ add_executable(${EXEC} ${SRCS}) 237 target_link_libraries(${EXEC} ${HELLO_PI_LIBS}) 238 239 install(TARGETS ${EXEC} 240- RUNTIME DESTINATION bin) 241+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 242diff --git a/host_applications/linux/apps/hello_pi/hello_encode/CMakeLists.txt b/host_applications/linux/apps/hello_pi/hello_encode/CMakeLists.txt 243index 147623b..98a197a 100644 244--- a/host_applications/linux/apps/hello_pi/hello_encode/CMakeLists.txt 245+++ b/host_applications/linux/apps/hello_pi/hello_encode/CMakeLists.txt 246@@ -5,4 +5,4 @@ add_executable(${EXEC} ${SRCS}) 247 target_link_libraries(${EXEC} ${HELLO_PI_LIBS}) 248 249 install(TARGETS ${EXEC} 250- RUNTIME DESTINATION bin) 251+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 252diff --git a/host_applications/linux/apps/hello_pi/hello_font/CMakeLists.txt b/host_applications/linux/apps/hello_pi/hello_font/CMakeLists.txt 253index 448d2cf..1d89f4c 100644 254--- a/host_applications/linux/apps/hello_pi/hello_font/CMakeLists.txt 255+++ b/host_applications/linux/apps/hello_pi/hello_font/CMakeLists.txt 256@@ -6,4 +6,4 @@ target_link_libraries(${EXEC} ${HELLO_PI_LIBS}) 257 target_link_libraries(${EXEC} vgfont freetype z) 258 259 install(TARGETS ${EXEC} 260- RUNTIME DESTINATION bin) 261+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 262diff --git a/host_applications/linux/apps/hello_pi/hello_jpeg/CMakeLists.txt b/host_applications/linux/apps/hello_pi/hello_jpeg/CMakeLists.txt 263index a56dda5..f611f8e 100644 264--- a/host_applications/linux/apps/hello_pi/hello_jpeg/CMakeLists.txt 265+++ b/host_applications/linux/apps/hello_pi/hello_jpeg/CMakeLists.txt 266@@ -5,4 +5,4 @@ add_executable(${EXEC} ${SRCS}) 267 target_link_libraries(${EXEC} ${HELLO_PI_LIBS}) 268 269 install(TARGETS ${EXEC} 270- RUNTIME DESTINATION bin) 271+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 272diff --git a/host_applications/linux/apps/hello_pi/hello_teapot/CMakeLists.txt b/host_applications/linux/apps/hello_pi/hello_teapot/CMakeLists.txt 273index cdb8413..a60da3e 100644 274--- a/host_applications/linux/apps/hello_pi/hello_teapot/CMakeLists.txt 275+++ b/host_applications/linux/apps/hello_pi/hello_teapot/CMakeLists.txt 276@@ -5,4 +5,4 @@ add_executable(${EXEC} ${SRCS}) 277 target_link_libraries(${EXEC} ${HELLO_PI_LIBS}) 278 279 install(TARGETS ${EXEC} 280- RUNTIME DESTINATION bin) 281+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 282diff --git a/host_applications/linux/apps/hello_pi/hello_tiger/CMakeLists.txt b/host_applications/linux/apps/hello_pi/hello_tiger/CMakeLists.txt 283index b253f3f..1104a8b 100644 284--- a/host_applications/linux/apps/hello_pi/hello_tiger/CMakeLists.txt 285+++ b/host_applications/linux/apps/hello_pi/hello_tiger/CMakeLists.txt 286@@ -6,4 +6,4 @@ add_executable(${EXEC} ${SRCS}) 287 target_link_libraries(${EXEC} ${HELLO_PI_LIBS}) 288 289 install(TARGETS ${EXEC} 290- RUNTIME DESTINATION bin) 291+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 292diff --git a/host_applications/linux/apps/hello_pi/hello_triangle/CMakeLists.txt b/host_applications/linux/apps/hello_pi/hello_triangle/CMakeLists.txt 293index 4e8128e..4b738bb 100644 294--- a/host_applications/linux/apps/hello_pi/hello_triangle/CMakeLists.txt 295+++ b/host_applications/linux/apps/hello_pi/hello_triangle/CMakeLists.txt 296@@ -5,4 +5,4 @@ add_executable(${EXEC} ${SRCS}) 297 target_link_libraries(${EXEC} ${HELLO_PI_LIBS}) 298 299 install(TARGETS ${EXEC} 300- RUNTIME DESTINATION bin) 301+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 302diff --git a/host_applications/linux/apps/hello_pi/hello_triangle2/CMakeLists.txt b/host_applications/linux/apps/hello_pi/hello_triangle2/CMakeLists.txt 303index 390980a..c8c534f 100644 304--- a/host_applications/linux/apps/hello_pi/hello_triangle2/CMakeLists.txt 305+++ b/host_applications/linux/apps/hello_pi/hello_triangle2/CMakeLists.txt 306@@ -5,4 +5,4 @@ add_executable(${EXEC} ${SRCS}) 307 target_link_libraries(${EXEC} ${HELLO_PI_LIBS}) 308 309 install(TARGETS ${EXEC} 310- RUNTIME DESTINATION bin) 311+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 312diff --git a/host_applications/linux/apps/hello_pi/hello_video/CMakeLists.txt b/host_applications/linux/apps/hello_pi/hello_video/CMakeLists.txt 313index 42187af..6b15ca2 100644 314--- a/host_applications/linux/apps/hello_pi/hello_video/CMakeLists.txt 315+++ b/host_applications/linux/apps/hello_pi/hello_video/CMakeLists.txt 316@@ -5,4 +5,4 @@ add_executable(${EXEC} ${SRCS}) 317 target_link_libraries(${EXEC} ${HELLO_PI_LIBS}) 318 319 install(TARGETS ${EXEC} 320- RUNTIME DESTINATION bin) 321+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 322diff --git a/host_applications/linux/apps/hello_pi/hello_videocube/CMakeLists.txt b/host_applications/linux/apps/hello_pi/hello_videocube/CMakeLists.txt 323index d7fb059..9612ffe 100644 324--- a/host_applications/linux/apps/hello_pi/hello_videocube/CMakeLists.txt 325+++ b/host_applications/linux/apps/hello_pi/hello_videocube/CMakeLists.txt 326@@ -5,4 +5,4 @@ add_executable(${EXEC} ${SRCS}) 327 target_link_libraries(${EXEC} ${HELLO_PI_LIBS}) 328 329 install(TARGETS ${EXEC} 330- RUNTIME DESTINATION bin) 331+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 332diff --git a/host_applications/linux/apps/hello_pi/hello_wayland/CMakeLists.txt b/host_applications/linux/apps/hello_pi/hello_wayland/CMakeLists.txt 333index 9a2f75c..9a468a6 100644 334--- a/host_applications/linux/apps/hello_pi/hello_wayland/CMakeLists.txt 335+++ b/host_applications/linux/apps/hello_pi/hello_wayland/CMakeLists.txt 336@@ -5,4 +5,4 @@ add_executable(${EXEC} ${SRCS}) 337 target_link_libraries(${EXEC} ${HELLO_PI_LIBS} -lwayland-client -lwayland-egl) 338 339 install(TARGETS ${EXEC} 340- RUNTIME DESTINATION bin) 341+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 342diff --git a/host_applications/linux/apps/hello_pi/hello_world/CMakeLists.txt b/host_applications/linux/apps/hello_pi/hello_world/CMakeLists.txt 343index b0120fe..97d90f6 100644 344--- a/host_applications/linux/apps/hello_pi/hello_world/CMakeLists.txt 345+++ b/host_applications/linux/apps/hello_pi/hello_world/CMakeLists.txt 346@@ -5,4 +5,4 @@ add_executable(${EXEC} ${SRCS}) 347 target_link_libraries(${EXEC} ${HELLO_PI_LIBS}) 348 349 install(TARGETS ${EXEC} 350- RUNTIME DESTINATION bin) 351+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 352diff --git a/host_applications/linux/apps/raspicam/CMakeLists.txt b/host_applications/linux/apps/raspicam/CMakeLists.txt 353index f73a4d0..4a9cd88 100644 354--- a/host_applications/linux/apps/raspicam/CMakeLists.txt 355+++ b/host_applications/linux/apps/raspicam/CMakeLists.txt 356@@ -66,6 +66,6 @@ target_link_libraries(raspiyuv ${MMAL_LIBS} vcos bcm_host m) 357 target_link_libraries(raspivid ${MMAL_LIBS} vcos bcm_host m) 358 target_link_libraries(raspividyuv ${MMAL_LIBS} vcos bcm_host m) 359 360-install(TARGETS raspistill raspiyuv raspivid raspividyuv RUNTIME DESTINATION bin) 361+install(TARGETS raspistill raspiyuv raspivid raspividyuv RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 362 install(FILES raspistill.1 raspiyuv.1 raspivid.1 raspividyuv.1 DESTINATION man/man1) 363 install(FILES raspicam.7 DESTINATION man/man7) 364diff --git a/host_applications/linux/apps/smem/CMakeLists.txt b/host_applications/linux/apps/smem/CMakeLists.txt 365index 0fa8328..60c9c61 100644 366--- a/host_applications/linux/apps/smem/CMakeLists.txt 367+++ b/host_applications/linux/apps/smem/CMakeLists.txt 368@@ -16,5 +16,5 @@ include_directories ( 369 add_executable(vcsmem smem.c) 370 target_link_libraries(vcsmem vcos vcsm vchostif) 371 372-install(TARGETS vcsmem RUNTIME DESTINATION bin) 373+install(TARGETS vcsmem RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 374 375diff --git a/host_applications/linux/apps/tvservice/CMakeLists.txt b/host_applications/linux/apps/tvservice/CMakeLists.txt 376index 0190774..fad5a6b 100644 377--- a/host_applications/linux/apps/tvservice/CMakeLists.txt 378+++ b/host_applications/linux/apps/tvservice/CMakeLists.txt 379@@ -3,5 +3,5 @@ add_executable(tvservice tvservice.c) 380 target_link_libraries(tvservice vchostif bcm_host) 381 382 install(TARGETS tvservice 383- RUNTIME DESTINATION bin) 384+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 385 install(FILES tvservice.1 DESTINATION man/man1) 386diff --git a/host_applications/linux/apps/vcmailbox/CMakeLists.txt b/host_applications/linux/apps/vcmailbox/CMakeLists.txt 387index d153363..2731724 100644 388--- a/host_applications/linux/apps/vcmailbox/CMakeLists.txt 389+++ b/host_applications/linux/apps/vcmailbox/CMakeLists.txt 390@@ -2,6 +2,6 @@ add_executable(vcmailbox vcmailbox.c) 391 target_link_libraries(vcmailbox vchostif) 392 393 install(TARGETS vcmailbox 394- RUNTIME DESTINATION bin) 395+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 396 install(FILES vcmailbox.1 DESTINATION man/man1) 397 install(FILES vcmailbox.7 raspiotp.7 raspirev.7 DESTINATION man/man7) 398diff --git a/host_applications/linux/libs/bcm_host/CMakeLists.txt b/host_applications/linux/libs/bcm_host/CMakeLists.txt 399index 7a4ab06..3614943 100644 400--- a/host_applications/linux/libs/bcm_host/CMakeLists.txt 401+++ b/host_applications/linux/libs/bcm_host/CMakeLists.txt 402@@ -19,5 +19,5 @@ add_library(bcm_host ${SHARED} bcm_host.c) 403 404 target_link_libraries(bcm_host vcos vchostif) 405 406-install(TARGETS bcm_host DESTINATION lib) 407+install(TARGETS bcm_host DESTINATION ${CMAKE_INSTALL_LIBDIR}) 408 409diff --git a/host_applications/linux/libs/debug_sym/CMakeLists.txt b/host_applications/linux/libs/debug_sym/CMakeLists.txt 410index d437b99..37eb759 100644 411--- a/host_applications/linux/libs/debug_sym/CMakeLists.txt 412+++ b/host_applications/linux/libs/debug_sym/CMakeLists.txt 413@@ -11,6 +11,6 @@ include_directories ( 414 add_library(debug_sym ${SHARED} debug_sym.c) 415 add_library(debug_sym_static STATIC debug_sym.c) 416 417-install(TARGETS debug_sym DESTINATION lib) 418-install(TARGETS debug_sym_static DESTINATION lib) 419-install(FILES debug_sym.h DESTINATION include/interface/debug_sym) 420+install(TARGETS debug_sym DESTINATION ${CMAKE_INSTALL_LIBDIR}) 421+install(TARGETS debug_sym_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) 422+install(FILES debug_sym.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/interface/debug_sym) 423diff --git a/host_applications/linux/libs/sm/CMakeLists.txt b/host_applications/linux/libs/sm/CMakeLists.txt 424index 5ce5aca..84d8123 100644 425--- a/host_applications/linux/libs/sm/CMakeLists.txt 426+++ b/host_applications/linux/libs/sm/CMakeLists.txt 427@@ -14,5 +14,5 @@ add_library(vcsm ${SHARED} user-vcsm.c) 428 429 target_link_libraries(vcsm vcos) 430 431-install(TARGETS vcsm DESTINATION lib) 432-install(FILES user-vcsm.h DESTINATION include/interface/vcsm) 433+install(TARGETS vcsm DESTINATION ${CMAKE_INSTALL_LIBDIR}) 434+install(FILES user-vcsm.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/interface/vcsm) 435diff --git a/interface/khronos/CMakeLists.txt b/interface/khronos/CMakeLists.txt 436index 95c0e11..00316a5 100644 437--- a/interface/khronos/CMakeLists.txt 438+++ b/interface/khronos/CMakeLists.txt 439@@ -94,11 +94,11 @@ if (BUILD_WAYLAND) 440 ) 441 442 add_library(wayland-egl ${SHARED} ${WAYLAND_EGL_SOURCE}) 443- install(TARGETS wayland-egl DESTINATION lib) 444+ install(TARGETS wayland-egl DESTINATION ${CMAKE_INSTALL_LIBDIR}) 445 446 configure_file ("wayland-egl/wayland-egl.pc.in" "wayland-egl/wayland-egl.pc" @ONLY) 447 install (FILES "${CMAKE_CURRENT_BINARY_DIR}/wayland-egl/wayland-egl.pc" 448- DESTINATION lib/pkgconfig) 449+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) 450 endif () 451 452 add_library(EGL ${SHARED} ${EGL_SOURCE}) 453@@ -126,8 +126,8 @@ target_link_libraries(GLESv2 EGL khrn_client vcos) 454 target_link_libraries(WFC EGL) 455 target_link_libraries(OpenVG EGL) 456 457-install(TARGETS EGL GLESv2 OpenVG WFC khrn_client DESTINATION lib) 458-install(TARGETS EGL_static GLESv2_static khrn_static DESTINATION lib) 459+install(TARGETS EGL GLESv2 OpenVG WFC khrn_client DESTINATION ${CMAKE_INSTALL_LIBDIR}) 460+install(TARGETS EGL_static GLESv2_static khrn_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) 461 462 # recommended names to use to avoid conflicts with mesa libs 463 add_library(brcmEGL ${SHARED} ${EGL_SOURCE}) 464@@ -140,4 +140,4 @@ target_link_libraries(brcmGLESv2 brcmEGL khrn_client vcos) 465 target_link_libraries(brcmWFC brcmEGL) 466 target_link_libraries(brcmOpenVG brcmEGL) 467 468-install(TARGETS brcmEGL brcmGLESv2 brcmOpenVG brcmWFC DESTINATION lib) 469+install(TARGETS brcmEGL brcmGLESv2 brcmOpenVG brcmWFC DESTINATION ${CMAKE_INSTALL_LIBDIR}) 470diff --git a/interface/mmal/CMakeLists.txt b/interface/mmal/CMakeLists.txt 471index c5c1642..fe784e8 100644 472--- a/interface/mmal/CMakeLists.txt 473+++ b/interface/mmal/CMakeLists.txt 474@@ -16,7 +16,7 @@ add_subdirectory(client) 475 476 target_link_libraries(mmal mmal_core mmal_util mmal_vc_client vcos mmal_components) 477 478-install(TARGETS mmal DESTINATION lib) 479+install(TARGETS mmal DESTINATION ${CMAKE_INSTALL_LIBDIR}) 480 install(FILES 481 mmal.h 482 mmal_buffer.h 483@@ -36,7 +36,7 @@ install(FILES 484 mmal_pool.h mmal_port.h 485 mmal_queue.h 486 mmal_types.h 487- DESTINATION include/interface/mmal 488+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/interface/mmal 489 ) 490 491 # Test apps 492diff --git a/interface/mmal/components/CMakeLists.txt b/interface/mmal/components/CMakeLists.txt 493index d65fa37..4c85de0 100644 494--- a/interface/mmal/components/CMakeLists.txt 495+++ b/interface/mmal/components/CMakeLists.txt 496@@ -30,5 +30,5 @@ set(container_libs ${container_libs} containers) 497 target_link_libraries(mmal_components ${container_libs} mmal_util) 498 target_link_libraries(mmal_components mmal_core) 499 500-install(TARGETS mmal_components DESTINATION lib) 501+install(TARGETS mmal_components DESTINATION ${CMAKE_INSTALL_LIBDIR}) 502 503diff --git a/interface/mmal/core/CMakeLists.txt b/interface/mmal/core/CMakeLists.txt 504index efa14d9..4fe0779 100644 505--- a/interface/mmal/core/CMakeLists.txt 506+++ b/interface/mmal/core/CMakeLists.txt 507@@ -13,7 +13,7 @@ add_library (mmal_core ${LIBRARY_TYPE} 508 509 target_link_libraries (mmal_core vcos mmal_vc_client) 510 511-install(TARGETS mmal_core DESTINATION lib) 512+install(TARGETS mmal_core DESTINATION ${CMAKE_INSTALL_LIBDIR}) 513 install(FILES 514 mmal_buffer_private.h 515 mmal_clock_private.h 516@@ -21,5 +21,5 @@ install(FILES 517 mmal_core_private.h 518 mmal_port_private.h 519 mmal_events_private.h 520- DESTINATION include/interface/mmal/core 521+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/interface/mmal/core 522 ) 523diff --git a/interface/mmal/util/CMakeLists.txt b/interface/mmal/util/CMakeLists.txt 524index b2a6858..e51afd0 100644 525--- a/interface/mmal/util/CMakeLists.txt 526+++ b/interface/mmal/util/CMakeLists.txt 527@@ -12,7 +12,7 @@ add_library (mmal_util ${LIBRARY_TYPE} 528 529 target_link_libraries (mmal_util vcos) 530 531-install(TARGETS mmal_util DESTINATION lib) 532+install(TARGETS mmal_util DESTINATION ${CMAKE_INSTALL_LIBDIR}) 533 install(FILES 534 mmal_component_wrapper.h 535 mmal_connection.h 536@@ -24,5 +24,5 @@ install(FILES 537 mmal_util.h 538 mmal_util_params.h 539 mmal_util_rational.h 540- DESTINATION include/interface/mmal/util 541+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/interface/mmal/util 542 ) 543diff --git a/interface/mmal/vc/CMakeLists.txt b/interface/mmal/vc/CMakeLists.txt 544index d6e80db..3b9ec64 100644 545--- a/interface/mmal/vc/CMakeLists.txt 546+++ b/interface/mmal/vc/CMakeLists.txt 547@@ -8,12 +8,12 @@ target_link_libraries(mmal_vc_client vchiq_arm vcos vcsm) 548 if(BUILD_MMAL_APPS) 549 add_executable(mmal_vc_diag mmal_vc_diag.c) 550 target_link_libraries(mmal_vc_diag mmal mmal_vc_client debug_sym vcos) 551-install(TARGETS mmal_vc_diag RUNTIME DESTINATION bin) 552+install(TARGETS mmal_vc_diag RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 553 endif(BUILD_MMAL_APPS) 554 555 include_directories ( ../../../host_applications/linux/libs/sm ) 556 557-install(TARGETS mmal_vc_client DESTINATION lib) 558+install(TARGETS mmal_vc_client DESTINATION ${CMAKE_INSTALL_LIBDIR}) 559 install(FILES 560 mmal_vc_api.h 561 mmal_vc_api_drm.h 562@@ -22,5 +22,5 @@ install(FILES 563 mmal_vc_msgs.h 564 mmal_vc_opaque_alloc.h 565 mmal_vc_shm.h 566- DESTINATION include/interface/mmal/vc 567+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/interface/mmal/vc 568 ) 569diff --git a/interface/vchiq_arm/CMakeLists.txt b/interface/vchiq_arm/CMakeLists.txt 570index 7af383d..e5a3224 100644 571--- a/interface/vchiq_arm/CMakeLists.txt 572+++ b/interface/vchiq_arm/CMakeLists.txt 573@@ -5,7 +5,7 @@ add_library(vchiq_arm SHARED 574 # pull in VCHI cond variable emulation 575 target_link_libraries(vchiq_arm vcos) 576 577-install(TARGETS vchiq_arm DESTINATION lib) 578+install(TARGETS vchiq_arm DESTINATION ${CMAKE_INSTALL_LIBDIR}) 579 #install(FILES etc/10-vchiq.rules DESTINATION /etc/udev/rules.d) 580 581 include_directories(../..) 582@@ -17,4 +17,4 @@ target_link_libraries(vchiq_test 583 vchiq_arm 584 vcos) 585 586-install(TARGETS vchiq_test RUNTIME DESTINATION bin) 587+install(TARGETS vchiq_test RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 588diff --git a/interface/vcos/CMakeLists.txt b/interface/vcos/CMakeLists.txt 589index 23a8d72..b0924a4 100644 590--- a/interface/vcos/CMakeLists.txt 591+++ b/interface/vcos/CMakeLists.txt 592@@ -65,4 +65,4 @@ if (WIN32) 593 configure_file (build_all.bat.in build_all.bat @ONLY) 594 endif () 595 596-#install (FILES ${HEADERS} DESTINATION include/interface/vcos) 597+#install (FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/interface/vcos) 598diff --git a/interface/vcos/generic/CMakeLists.txt b/interface/vcos/generic/CMakeLists.txt 599index c09f376..8af98fd 100644 600--- a/interface/vcos/generic/CMakeLists.txt 601+++ b/interface/vcos/generic/CMakeLists.txt 602@@ -18,4 +18,4 @@ foreach (header ${HEADERS}) 603 configure_file ("${header}" "${VCOS_HEADERS_BUILD_DIR}/generic/${header}" COPYONLY) 604 endforeach () 605 606-install (FILES ${HEADERS} DESTINATION include/interface/vcos/generic) 607+install (FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/interface/vcos/generic) 608diff --git a/interface/vcos/pthreads/CMakeLists.txt b/interface/vcos/pthreads/CMakeLists.txt 609index d6cd415..821b3f3 100644 610--- a/interface/vcos/pthreads/CMakeLists.txt 611+++ b/interface/vcos/pthreads/CMakeLists.txt 612@@ -50,5 +50,5 @@ else () 613 endif () 614 615 616-#install(FILES ${HEADERS} DESTINATION include) 617-install(TARGETS vcos DESTINATION lib) 618+#install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_LIBDIR}) 619+install(TARGETS vcos DESTINATION ${CMAKE_INSTALL_LIBDIR}) 620diff --git a/interface/vmcs_host/CMakeLists.txt b/interface/vmcs_host/CMakeLists.txt 621index 76813c9..0984d8a 100755 622--- a/interface/vmcs_host/CMakeLists.txt 623+++ b/interface/vmcs_host/CMakeLists.txt 624@@ -35,5 +35,5 @@ target_link_libraries(vchostif vchiq_arm vcos) 625 626 #target_link_libraries(bufman WFC) 627 628-install(TARGETS ${INSTALL_TARGETS} DESTINATION lib) 629+install(TARGETS ${INSTALL_TARGETS} DESTINATION ${CMAKE_INSTALL_LIBDIR}) 630 631diff --git a/makefiles/cmake/vmcs.cmake b/makefiles/cmake/vmcs.cmake 632index 7c97463..a1eb911 100644 633--- a/makefiles/cmake/vmcs.cmake 634+++ b/makefiles/cmake/vmcs.cmake 635@@ -16,7 +16,7 @@ endif() 636 SET(CMAKE_INSTALL_PREFIX "${VMCS_INSTALL_PREFIX}" CACHE INTERNAL "Prefix 637 prepended to install directories" FORCE) 638 if(NOT DEFINED VMCS_PLUGIN_DIR) 639- SET(VMCS_PLUGIN_DIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_SHARED_LIBRARY_PREFIX}/plugins) 640+ SET(VMCS_PLUGIN_DIR ${CMAKE_INSTALL_LIBDIR}/plugins) 641 endif() 642 643 # What kind of system are we? 644diff --git a/middleware/openmaxil/CMakeLists.txt b/middleware/openmaxil/CMakeLists.txt 645index 3e9c5f9..c063740 100644 646--- a/middleware/openmaxil/CMakeLists.txt 647+++ b/middleware/openmaxil/CMakeLists.txt 648@@ -49,4 +49,4 @@ else () 649 650 endif () 651 652-install (TARGETS openmaxil DESTINATION lib) 653+install (TARGETS openmaxil DESTINATION ${CMAKE_INSTALL_LIBDIR}) 654diff --git a/pkgconfig/bcm_host.pc.in b/pkgconfig/bcm_host.pc.in 655index c7237c5..2988b42 100644 656--- a/pkgconfig/bcm_host.pc.in 657+++ b/pkgconfig/bcm_host.pc.in 658@@ -1,6 +1,6 @@ 659 prefix=@CMAKE_INSTALL_PREFIX@ 660 exec_prefix=${prefix} 661-libdir=${exec_prefix}/lib 662+libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ 663 includedir=${prefix}/include 664 665 Name: bcm_host 666diff --git a/pkgconfig/brcmegl.pc.in b/pkgconfig/brcmegl.pc.in 667index 5dd3d5b..a45bf22 100644 668--- a/pkgconfig/brcmegl.pc.in 669+++ b/pkgconfig/brcmegl.pc.in 670@@ -1,6 +1,6 @@ 671 prefix=@CMAKE_INSTALL_PREFIX@ 672 exec_prefix=${prefix} 673-libdir=${exec_prefix}/lib 674+libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ 675 includedir=${prefix}/include 676 677 Name: brcmEGL 678diff --git a/pkgconfig/brcmglesv2.pc.in b/pkgconfig/brcmglesv2.pc.in 679index e0e36f5..902fbf3 100644 680--- a/pkgconfig/brcmglesv2.pc.in 681+++ b/pkgconfig/brcmglesv2.pc.in 682@@ -1,6 +1,6 @@ 683 prefix=@CMAKE_INSTALL_PREFIX@ 684 exec_prefix=${prefix} 685-libdir=${exec_prefix}/lib 686+libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ 687 includedir=${prefix}/include 688 689 Name: brcmGLESv2 690diff --git a/pkgconfig/brcmvg.pc.in b/pkgconfig/brcmvg.pc.in 691index 763a44b..98489ee 100644 692--- a/pkgconfig/brcmvg.pc.in 693+++ b/pkgconfig/brcmvg.pc.in 694@@ -1,6 +1,6 @@ 695 prefix=@CMAKE_INSTALL_PREFIX@ 696 exec_prefix=${prefix} 697-libdir=${exec_prefix}/lib 698+libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ 699 includedir=${prefix}/include 700 701 Name: brcmOpenVG 702diff --git a/pkgconfig/mmal.pc.in b/pkgconfig/mmal.pc.in 703index 37d344c..1ffa4f5 100644 704--- a/pkgconfig/mmal.pc.in 705+++ b/pkgconfig/mmal.pc.in 706@@ -1,6 +1,6 @@ 707 prefix=@CMAKE_INSTALL_PREFIX@ 708 exec_prefix=${prefix} 709-libdir=${exec_prefix}/lib 710+libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ 711 includedir=${prefix}/include 712 713 Name: MMAL 714diff --git a/pkgconfig/vcsm.pc.in b/pkgconfig/vcsm.pc.in 715index b12c56f..6f762cb 100644 716--- a/pkgconfig/vcsm.pc.in 717+++ b/pkgconfig/vcsm.pc.in 718@@ -1,6 +1,6 @@ 719 prefix=@CMAKE_INSTALL_PREFIX@ 720 exec_prefix=${prefix} 721-libdir=${exec_prefix}/lib 722+libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ 723 includedir=${prefix}/include 724 725 Name: VCSM 726