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>
This commit is contained in:
parent
dd7e40b108
commit
43031d98fc
@ -89,6 +89,14 @@ macro(qt_enable_cmake_languages)
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
# Minimum setup required to have any CMakeList.txt build as as a standalone
|
||||
# project after importing BuildInternals
|
||||
macro(qt_prepare_standalone_project)
|
||||
qt_set_up_build_internals_paths()
|
||||
qt_build_internals_set_up_private_api()
|
||||
qt_enable_cmake_languages()
|
||||
endmacro()
|
||||
|
||||
macro(qt_build_repo_begin)
|
||||
qt_build_internals_set_up_private_api()
|
||||
qt_enable_cmake_languages()
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user