summaryrefslogtreecommitdiff
path: root/cmake/QtAppManHelpers.cmake
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@qt.io>2021-05-03 16:42:46 +0200
committerRobert Griebl <robert.griebl@qt.io>2021-06-18 13:06:27 +0200
commit26e09279f3cd12324657011c640972e297928f53 (patch)
tree17839d952b17fcc6338105a85604f543dc95547b /cmake/QtAppManHelpers.cmake
parent12b4ee7d85b1197cd4b6024e710430a747f76838 (diff)
downloadqtapplicationmanager-26e09279f3cd12324657011c640972e297928f53.tar.gz
cmake: Nearly full cmake build
Had to rename a lot of things to conform with the standard Qt module layout that the cmake system expects: - all non-manual tests were moved to a sub-dir named auto/ - the benchmark was moved to tests/ - the 3rdparty folder was moved into src/ Other changes: - libyaml was updated to 2.2.5 while fixing a weird build issue that led to crashes on 64bit systems. - fixed build issues with the new 8.1 MingW compiler. - added support for QT_NO_OPENGL builds. The remaining issues are: - examples still don't build with qmake due to a potential bug in module.pri generation. - tests do run, but the test data is not generated yet dynamically. - qml-only tests are not built and run yet. - qml-only examples are not built yet. Fixes: AUTOSUITE-1632 Change-Id: Ic5fe0148e738b05835c73bed78e624b55861b75e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Dominik Holland <dominik.holland@qt.io>
Diffstat (limited to 'cmake/QtAppManHelpers.cmake')
-rw-r--r--cmake/QtAppManHelpers.cmake21
1 files changed, 21 insertions, 0 deletions
diff --git a/cmake/QtAppManHelpers.cmake b/cmake/QtAppManHelpers.cmake
new file mode 100644
index 00000000..d19120a8
--- /dev/null
+++ b/cmake/QtAppManHelpers.cmake
@@ -0,0 +1,21 @@
+# This function is a hack to make generating DBus adaptors without custom cpp files possible
+function(qtam_internal_add_dbus_adaptor target)
+ if (NOT TARGET "${target}")
+ message(FATAL_ERROR "Trying to extend non-existing target \"${target}\".")
+ endif()
+
+ cmake_parse_arguments(arg "" "" "DBUS_ADAPTOR_SOURCES;DBUS_ADAPTOR_FLAGS" ${ARGN})
+
+ foreach(adaptor ${arg_DBUS_ADAPTOR_SOURCES})
+ qt_internal_extend_target(${target}
+ DBUS_ADAPTOR_SOURCES ${adaptor}
+ DBUS_ADAPTOR_FLAGS ${arg_DBUS_ADAPTOR_FLAGS}
+ )
+
+ # hack to remove the .cpp file, which we implement ourselves
+ get_target_property(srcs ${target} SOURCES)
+ list(REMOVE_AT srcs -1)
+ set_target_properties(${target} PROPERTIES SOURCES "${srcs}")
+
+ endforeach()
+endfunction()