diff options
author | Oliver Eftevaag <oliver.eftevaag@qt.io> | 2021-10-04 23:38:05 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-11-11 13:26:02 +0000 |
commit | 5862c836a7e6c4420ecf694affa91f527f18e4c0 (patch) | |
tree | 3aa0b63ddb4daa7e1f032e500d57d87f797ba940 /examples | |
parent | 3c4aa36f6c79f126a408bb4ed35505e41cb6e5c4 (diff) |
painteditem: better error message when running cmake on textballoon
Building the TextBalloon in isolation doesn't make any sense.
Its purpose is to implement a delegate, for the painteditem example to
use, and should therefore only be built as part of the painteditem
project.
To build the example, cmake should be invoked with
examples/quick/customitems/painteditem/CMakeLists.txt as its source
path.
The CMakeLists.txt in examples/quick/customitems/painteditem/TextBalloon
should only be used from another CMakeLists.txt file via the
add_subdirectory() command. If invoked directly it makes sense to print
an error message and stop processing.
Task-number: QTBUG-96806
Change-Id: I1ebd2157790afbf7307498a4fb64049794ae6c5b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit fe59c788a65579bbeeb550fcad96cf26443df77a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/quick/customitems/painteditem/TextBalloon/CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/quick/customitems/painteditem/TextBalloon/CMakeLists.txt b/examples/quick/customitems/painteditem/TextBalloon/CMakeLists.txt index eb0ef1fd87..fb2bf7568e 100644 --- a/examples/quick/customitems/painteditem/TextBalloon/CMakeLists.txt +++ b/examples/quick/customitems/painteditem/TextBalloon/CMakeLists.txt @@ -1,3 +1,7 @@ +if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) + message(FATAL_ERROR "TextBalloon should be built as part of the 'painteditem' project, and not in isolation.") +endif() + set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/customitems/painteditem/TextBalloon") qt_add_qml_module(qmltextballoon |