summaryrefslogtreecommitdiffstats
path: root/src/dbus/Qt6DBusMacros.cmake
Commit message (Collapse)AuthorAgeFilesLines
* dbus: Skip AUTOUIC on generated sourcesKevin Funk2020-09-211-2/+8
| | | | | | | | | | | | | | | | | | Skip AUTOUIC on sources generated by the qt_add_dbus_interface and qt_add_dbus_adaptor macros. Otherwise CMake will warn due to policy CMP0071: ``` For compatibility, CMake is excluding the GENERATED source file(s): (...) from processing by AUTOMOC and AUTOUIC. (...) ``` Pick-to: 5.15 Change-Id: I7d14b23c9343940964d5bc0d1d18fc19b41b5cd0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Workaround building DBus 'car' example with qmakeAlexandru Croitor2020-08-231-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While trying to implement instructions for building examples with qmake in the CI, an issue has surfaced. When building examples with CMake with -DBUILD_EXAMPLES=ON in the CI, the examples are built in-source, aka source dir == build dir. This means that the header files generated by qdbusxml2cpp will be placed in the qtbase source dir. The instructions that try to build examples with qmake build the examples in a separate build dir after building the examples with CMake. Unfortunately the qtbase/examples/dbus/remotecontrolledcar/car example includes the generated DBus adaptor header via a statement like #include "car_adaptor.h" and the compiler prefers to pick up the header file from the example source dir (the one generated by CMake), rather than the one generated by qmake in the example build dir. Because CMake's DBus integration uses different flags than qmake's DBus integration, the generated header file code is not compatible with the qmake generated cpp file, and the example fails to link when building with qmake, because it can't find an appropriate constructor symbol. In an ideal world, we wouldn't do in-source builds with the CMake build, but that leads to other issues which I currently don't recall. To circumvent the issue, adapt the CMake DBus qt6_add_dbus_adaptor function to allow not passing the problematic '-l' flag by making it optional. This shouldn't break existing code, but allows us to generate a compatible header that will be used by qmake and succeed in linking the example. Task-number: QTBUG-85986 Change-Id: I06759f79aeb66bb32da7f158f55dd4734c4a9887 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Update add_custom_command and add_custom_target dependenciesLeander Beernaert2020-02-031-4/+9
| | | | | | | | | | | If we don't add the executable used by the custom_target and/or custom_command to list of the command's/target's dependencies (DEPENDS) the generated file will not update should the executable change. Change-Id: Idce30f3dd4f756d9e8f6848c5e16f5dd6c7c8f0a Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Add Qt 5 backward compatible CMake APIAlexandru Croitor2020-01-271-0/+43
| | | | | | | | | | | Create versionless function names, that coincide with the Qt 5 CMake API. Task-number: QTBUG-74137 Task-number: QTBUG-80477 Change-Id: I8559b2c8a49b23e5a89ec81603aaec54ea634d70 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/dev' into merge-devLeander Beernaert2020-01-241-4/+4
| | | | Change-Id: I31b761cfd5ea01373c60d02a5da8c33398d34739
* Update public CMake macros' versionLeander Beernaert2019-08-231-7/+7
| | | | | | | Update all public Qt macros to use qt6/QT6 instead of qt5/QT6. Change-Id: Ib178f4fa21f37dfb8da7d4d8c097aa0e96c9d9f9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-06-141-0/+154
This changes many different CMake places to mention Qt6 instead of Qt5. Note that some old qt5 cmake config files in corelib are probably not needed anymore, but I still renamed and kept them for now. Change-Id: Ie69e81540386a5af153f76c0242e18d48211bec4