meta-qt6/recipes-qt/qt6/qttools/0001-examples-don-t-track-source-path.patch
Samuli Piippo fbaed93d8b Add separate recipes for Qt module examples
Building Qt examples as part of the module build is no longer
recommended and results in missing files in some of the examples.
Add separate recipes for each Qt module that has examples.

Don't package sources with the examples, but set debug mapping
to the module's source path.

Qt module examples are mainly available with BSD-3-Clause license,
regardless of licenses that the modules themselves are using.

Since qtdoc module has only examples, remove the module recipe.

Fixes: QTBUG-136651
Change-Id: Ic8f8c579a28b9a1369f8463f725574b0c67a896a
Reviewed-by: Ari Parkkila <ari.parkkila@qt.io>
2025-08-27 12:04:04 +00:00

46 lines
1.6 KiB
Diff

From 6acac52cec61494e97d3e3db68df2da3c22cff5b Mon Sep 17 00:00:00 2001
From: Samuli Piippo <samuli.piippo@qt.io>
Date: Fri, 18 Oct 2024 09:02:20 +0000
Subject: [PATCH] examples: don't track source path
Avoid using source path in the example binary as that causes
QA error [buildpaths]
Upstream-Status: Pending
Change-Id: Id5aebc2afa7d4ded38d6bdd43fbbb2813f4bad5d
---
examples/assistant/simpletextviewer/CMakeLists.txt | 4 ----
examples/help/contextsensitivehelp/CMakeLists.txt | 4 ----
2 files changed, 8 deletions(-)
diff --git a/examples/assistant/simpletextviewer/CMakeLists.txt b/examples/assistant/simpletextviewer/CMakeLists.txt
index 8d459a261..89076bcd1 100644
--- a/examples/assistant/simpletextviewer/CMakeLists.txt
+++ b/examples/assistant/simpletextviewer/CMakeLists.txt
@@ -27,10 +27,6 @@ set_target_properties(simpletextviewer PROPERTIES
MACOSX_BUNDLE TRUE
)
-target_compile_definitions(simpletextviewer PUBLIC
- SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/"
-)
-
target_link_libraries(simpletextviewer PUBLIC
Qt::Core
Qt::Gui
diff --git a/examples/help/contextsensitivehelp/CMakeLists.txt b/examples/help/contextsensitivehelp/CMakeLists.txt
index fb251dea7..dd0c30434 100644
--- a/examples/help/contextsensitivehelp/CMakeLists.txt
+++ b/examples/help/contextsensitivehelp/CMakeLists.txt
@@ -27,10 +27,6 @@ set_target_properties(contextsensitivehelp PROPERTIES
MACOSX_BUNDLE TRUE
)
-target_compile_definitions(contextsensitivehelp PUBLIC
- SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/"
-)
-
target_link_libraries(contextsensitivehelp PUBLIC
Qt6::Core
Qt6::Gui