From e0be15cf01d3c375ec7a5489bfb4f39b9224b5d8 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Thu, 27 Jun 2024 18:15:53 +0200 Subject: [PATCH] CMakeLists: Add QCoreApplication to SQLite test Fixes #1471 --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1203be315..1cfe3f7cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -455,9 +455,11 @@ if(NOT CMAKE_CROSSCOMPILING) set(CMAKE_REQUIRED_FLAGS "-std=c++17") set(CMAKE_REQUIRED_LIBRARIES Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Sql) check_cxx_source_runs(" + #include #include #include - int main() { + int main(int argc, char *argv[]) { + QCoreApplication app(argc, argv); QSqlDatabase db = QSqlDatabase::addDatabase(\"QSQLITE\"); db.setDatabaseName(\":memory:\"); if (!db.open()) { return 1; }