diff options
author | Leander Beernaert <leander.beernaert@qt.io> | 2020-04-23 11:24:48 +0200 |
---|---|---|
committer | Leander Beernaert <leander.beernaert@qt.io> | 2020-04-24 07:41:13 +0200 |
commit | 43031d98fc2864794d6486d03778529330b024f0 (patch) | |
tree | 68b737e7445ca395498d8223c43fccc0c0ab4774 /src | |
parent | dd7e40b1086020f6a054957f4972720cd6849280 (diff) |
CMake: Allow sqldriver plugins to be built as standalone
This patch allows all the sqldrivers to be built as a standalone project.
It is not possible to build each plugin separately due to the configuration
features definition being located in the sqldriver's folder CMakeLists.txt.
In other words, the project needs to be generated from the
src/plugins/sqldrivers/CMakeLists.txt file.
Fixes: QTBUG-82962
Change-Id: If41c7e3827589391830a894a9c998d2e56239562
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/sqldrivers/CMakeLists.txt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/plugins/sqldrivers/CMakeLists.txt b/src/plugins/sqldrivers/CMakeLists.txt index d45f5712a8..8d46d68559 100644 --- a/src/plugins/sqldrivers/CMakeLists.txt +++ b/src/plugins/sqldrivers/CMakeLists.txt @@ -1,6 +1,22 @@ # Generated from sqldrivers.pro. # special case begin +if (NOT CMAKE_PROJECT_NAME STREQUAL "QtBase" AND NOT CMAKE_PROJECT_NAME STREQUAL "Qt") + cmake_minimum_required(VERSION 3.17) + project(QSQLiteDriverPlugins + VERSION 6.0.0 + DESCRIPTION "Qt6 SQL driver plugins" + HOMEPAGE_URL "https://qt.io/" + LANGUAGES CXX C ASM + ) + find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS + BuildInternals + Core + Sql + ) + qt_prepare_standalone_project() +endif() + # Currently handled completely manually. # TODO sqldrivers_standalone { |