cmake: Add preset to build flutter frontend standalone

It can't be build in conjuction with the QtWidgets one, since
that would mean using QAction from Qt and requiring a QApplication.

Instead just build the flutter frontend.
This commit is contained in:
Sergio Martins
2022-08-19 23:35:50 +01:00
parent 8c881b6db7
commit 809ca9e586
3 changed files with 22 additions and 9 deletions

View File

@@ -11,7 +11,7 @@
"KDDockWidgets_DEVELOPER_MODE": "ON",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"KDDockWidgets_FUZZER": "OFF",
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick;dummy;flutter"
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick;dummy"
},
"warnings": {
"uninitialized": true
@@ -29,7 +29,24 @@
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"KDDockWidgets_FUZZER": "OFF",
"ECM_ENABLE_SANITIZERS": "'address;undefined'",
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick;dummy;flutter"
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick;dummy"
},
"warnings": {
"uninitialized": true
}
},
{
"name": "dev-flutter",
"displayName": "dev-flutter",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build-dev-flutter",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"KDDockWidgets_DEVELOPER_MODE": "ON",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"KDDockWidgets_FUZZER": "OFF",
"KDDockWidgets_FRONTENDS": "flutter",
"ECM_ENABLE_SANITIZERS": "'address;undefined'"
},
"warnings": {
"uninitialized": true
@@ -394,4 +411,4 @@
}
}
]
}
}

View File

@@ -135,6 +135,8 @@ void Platform::tests_initPlatform(int &argc, char **argv, KDDockWidgets::Fronten
#ifdef KDDW_FRONTEND_FLUTTER
// TODOm4: This needs to be called from Dart
platform = nullptr;
Q_UNUSED(argc);
Q_UNUSED(argv);
#endif
break;
}

View File

@@ -19,12 +19,6 @@
#include "Window.h"
#include "private/View_p.h"
#include <QMouseEvent>
#include <QTabBar>
#include <QHBoxLayout>
#include <QAbstractButton>
#include <QMenu>
using namespace KDDockWidgets;
using namespace KDDockWidgets::Views;