summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-11-27 10:37:30 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2020-12-04 13:09:05 +0000
commitbe61909248ef6981dce781dbeb25e17d48e5cae3 (patch)
tree865b99f1a00749a3be9ba7f42a97ed3fa66fcfb5 /examples
parent87409ce0007e92d43f8e502f44528858c84b85d4 (diff)
CMake: Work around building dbus 'controller' example with qmake
Similar to what has been done in 5138a970f31, we need to adjust the remotecontrolledcar/controller dbus example to be built with qmake. In the CI we first build the examples with CMake in the source directory. That creates some generated source files in the dbus example dir. Then, the examples are (will be) built ouf of source with qmake, and those generated source files will be placed in the build directory. When building with MSVC, there's a peculiarity with nmake/jom's inference rules that lead to picking up the generated car_interface.cpp from the source directory, instead of the build directory. See QTBUG-13496 for details. car_interface.cpp, built with CMake is generated to include car_interface.moc. car_interface.cpp, built with qmake does not have this include, but the build system calls moc on car_interface.h. All this leads to duplication of the meta object for OrgExampleExamplesCarInterfaceInterface, preventing successful linking. Work around this issue by turning off the generation of nmake/jom inference rules. Task-number: QTBUG-85986 Change-Id: I0a6ca9f880b63f05a4e9f2032e44d3b391d8a756 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit b71c04353dc72e0fb6d384e0d5845524f1547f88)
Diffstat (limited to 'examples')
-rw-r--r--examples/dbus/remotecontrolledcar/controller/controller.pro3
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/dbus/remotecontrolledcar/controller/controller.pro b/examples/dbus/remotecontrolledcar/controller/controller.pro
index cc3b92f1a4..07767141f4 100644
--- a/examples/dbus/remotecontrolledcar/controller/controller.pro
+++ b/examples/dbus/remotecontrolledcar/controller/controller.pro
@@ -5,6 +5,9 @@ FORMS += controller.ui
HEADERS += controller.h
SOURCES += main.cpp controller.cpp
+# Work-around CI issue. Not needed in user code.
+CONFIG += no_batch
+
# install
target.path = $$[QT_INSTALL_EXAMPLES]/dbus/remotecontrolledcar/controller
INSTALLS += target