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 Pick-to: 6.2 Change-Id: I1ebd2157790afbf7307498a4fb64049794ae6c5b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
parent
fb26412952
commit
fe59c788a6
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue