path: root/examples/CMakeLists.txt
diff options
authorMichal Klocek <>2021-08-28 00:08:06 +0200
committerMichal Klocek <>2021-08-30 19:48:23 +0200
commitfe451151ab766ab3351f7bd7e88f2f75297382ed (patch)
tree5d5618f4a9d1dbebbb1c405834c36b31524970df /examples/CMakeLists.txt
parentb6cd55e60f42b5ebde1ebbf2977488e91a4e408b (diff)
Disable examples compilation on qemu
Cmake builds when cross compiling have 3 different sets of qt libs: * sysroot * host * staging ones (target) However unlike qmake cmake does not support rpath-link therefore libs during the linking can be resolved to the sysroot instead of staging (target) ones, meaning we compile against newer headers and link with older sysroot's lib. Luckily this only happens when cmake is not able to set full absolute path to the library in staging dir, which in turn depends on rpath of the library. If rpath start with ORIGIN cmake will make absolute path and all implicit dependency libs are pulled from that lib location. However, during examples builds libs for given module are not installed yet, meaning there is no ORIGIN in rpath libraries so no absolute path meaning that all implicit dependencies in result are pulled from sysroot. This leads to linker errors in best scenario or to faulty linked application. The workaround introduced in QTBUG-86533 is to add all implicit dependencies as explicit, but in case of webengine it means adding log list of implicit dependencies to every single example. Simply disable build of examples as workaround. Note tests are not currently affected by that issue on coin, since they are built after installing module libs, which is not the case for examples. Note this issue is affecting us now, since external project is gone and we do not install libs implicitly during module build stage. Task-number: QTBUG-86533 Change-Id: Ica29cffcfbfcf66912af60ba4f8e88eca3af6f78 Reviewed-by: Allan Sandfeld Jensen <> (cherry picked from commit 7d2a2bf1b022419872b9eac813afed112240631c
Diffstat (limited to 'examples/CMakeLists.txt')
1 files changed, 13 insertions, 11 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index fcc2fa2c7..54e8d5006 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,16 +1,18 @@
cmake_minimum_required(VERSION 3.16)
-if(QT_FEATURE_qtwebengine_build AND QT_FEATURE_qtwebengine_quick_build)
- add_subdirectory(webengine)
-if(QT_FEATURE_qtwebengine_build AND QT_FEATURE_qtwebengine_widgets_build)
- add_subdirectory(webenginewidgets)
-if(QT_FEATURE_qtpdf_build AND QT_FEATURE_qtpdf_quick_build)
- add_subdirectory(pdf)
-if(QT_FEATURE_qtpdf_build AND QT_FEATURE_qtpdf_widgets_build)
- add_subdirectory(pdfwidgets)
+ if(QT_FEATURE_qtwebengine_build AND QT_FEATURE_qtwebengine_quick_build)
+ add_subdirectory(webengine)
+ endif()
+ if(QT_FEATURE_qtwebengine_build AND QT_FEATURE_qtwebengine_widgets_build)
+ add_subdirectory(webenginewidgets)
+ endif()
+ if(QT_FEATURE_qtpdf_build AND QT_FEATURE_qtpdf_quick_build)
+ add_subdirectory(pdf)
+ endif()
+ if(QT_FEATURE_qtpdf_build AND QT_FEATURE_qtpdf_widgets_build)
+ add_subdirectory(pdfwidgets)
+ endif()