CMake build: Fix issues with sharing qmldesignercore files

When adding the .ui files from qmldesignercore.cmake to
tst_assetsImport and tst_merge in the qtquickdesigner repository,
AUTOUIC for some reason gets the output location for the
generated ui_*.h headers from: It puts them into
qtquickdesigner/tests/qtcreator/src/plugins/qmldesigner/designercore/
instances/
instead of into the corresponding *_autogen directory.

That leads to both tests wanting to generate the same file, and
ninja complains with

ninja: error: build.ninja:78635: multiple rules generate
qtquickdesigner/.....

Do not use AUTOUIC for these .ui files, but instead add them manually
with qt_wrap_ui.

Change-Id: I1d60fae95739335a87f8196ed2a686a0633165b2
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Eike Ziller
2022-06-15 11:38:48 +02:00
parent 35707f8674
commit addcfa6dc7

View File

@@ -49,6 +49,21 @@ function(extend_with_qmldesigner_core target_name)
rewritertransaction.h
)
# autouic gets confused when adding the ui files to tests in the qtquickdesigner repo,
# so manually add them for UIC
set(UI_FILES
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/designercore/instances/puppetbuildprogressdialog.ui
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/designercore/instances/puppetdialog.ui
)
qt_wrap_ui(UI_SOURCES ${UI_FILES})
extend_qtc_target(${target_name}
INCLUDES ${CMAKE_CURRENT_BINARY_DIR}
SOURCES
${UI_SOURCES}
${UI_FILES}
)
set_source_files_properties(${UI_FILES} PROPERTIES SKIP_AUTOUIC ON)
extend_qtc_target(${target_name}
INCLUDES
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/designercore/exceptions
@@ -204,12 +219,10 @@ function(extend_with_qmldesigner_core target_name)
instances/nodeinstanceview.cpp
instances/puppetbuildprogressdialog.cpp
instances/puppetbuildprogressdialog.h
instances/puppetbuildprogressdialog.ui
instances/puppetcreator.cpp
instances/puppetcreator.h
instances/puppetdialog.cpp
instances/puppetdialog.h
instances/puppetdialog.ui
instances/qprocessuniqueptr.h
metainfo/itemlibraryinfo.cpp