> can the system sqlite only be used with -plugin-sql-sqlite? Otherwise I > would prefer a separate option depending on !QT4_SQLITE_NONE > > Michael
If "system-sqlite" is not defined, the bundled sqlite3.c source will be used.
See qt pri file for sql drivers:
File:
qt-everywhere-opensource-src-4.6.3/src/sql/drivers/drivers.pri
...
contains(sql-drivers, sqlite) {
!system-sqlite:!contains( LIBS, .*sqlite3.* ) {
CONFIG(release, debug|release):DEFINES *= NDEBUG
DEFINES += SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE
INCLUDEPATH += ../3rdparty/sqlite
SOURCES += ../3rdparty/sqlite/sqlite3.c
} else {
LIBS *= $$QT_LFLAGS_SQLITE
QMAKE_CXXFLAGS *= $$QT_CFLAGS_SQLITE
}
...
If you would like to build the QtSql module with the SQLite v3 driver you can choose between built-in or plugin. In both cases the bundled SQLite sources are used. Now there is also an option to use the system sqlite library (as plugin). Signed-off-by: Markus Rathgeb <[email protected]> --- rules/qt4.in | 7 +++++++ rules/qt4.make | 7 +++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/rules/qt4.in b/rules/qt4.in index b24cd7d..90d449e 100644 --- a/rules/qt4.in +++ b/rules/qt4.in @@ -24,6 +24,7 @@ menuconfig QT4 select ALSA_LIB if QT4_BUILD_MULTIMEDIA # libsvga is currently not in ptxdist # select LIBSVGA if QT4_GFX_SVGA_PLUGIN + select SQLITE if QT4_SQLITE_SYSTEM select XORG_LIB_X11 if QT4_X11 select XORG_LIB_SM if QT4_X11_SM @@ -762,6 +763,12 @@ config QT4_SQLITE_PLUGIN bool "plugin " help Load the driver at runtime + +config QT4_SQLITE_SYSTEM + bool "system " + select SQLITE_THREADSAFE + help + Load the system SQLite3 driver at runtime endchoice endif # QT4_BUILD_SQL diff --git a/rules/qt4.make b/rules/qt4.make index 16b8639..fe49cbd 100644 --- a/rules/qt4.make +++ b/rules/qt4.make @@ -537,7 +537,7 @@ endif # is the option used if no Sql support is build? # this should be checked. As workaround use ifeq #ifdef PTXCONF_QT4_SQLITE_NONE -ifeq ($(PTXCONF_QT4_SQLITE_BUILTIN)$(PTXCONF_QT4_SQLITE_PLUGIN),) +ifeq ($(PTXCONF_QT4_SQLITE_BUILTIN)$(PTXCONF_QT4_SQLITE_PLUGIN)$(PTXCONF_QT4_SQLITE_SYSTEM),) QT4_AUTOCONF += -no-sql-sqlite endif ifdef PTXCONF_QT4_SQLITE_BUILTIN @@ -546,6 +546,9 @@ endif ifdef PTXCONF_QT4_SQLITE_PLUGIN QT4_AUTOCONF += -plugin-sql-sqlite endif +ifdef PTXCONF_QT4_SQLITE_SYSTEM +QT4_AUTOCONF += -plugin-sql-sqlite -system-sqlite +endif ifneq ($(PTXCONF_QT4_BUILD_DESIGNERLIBS)$(PTXCONF_QT4_BUILD_ASSISTANTLIB),) QT4_AUTOCONF += -make tools @@ -670,7 +673,7 @@ endif ifdef PTXCONF_QT4_BUILD_SQL @$(call install_lib, qt4, 0, 0, 0644, libQtSql) endif -ifdef PTXCONF_QT4_SQLITE_PLUGIN +ifneq ($(PTXCONF_QT4_SQLITE_PLUGIN)$(PTXCONF_QT4_SQLITE_SYSTEM),) @$(call install_copy, qt4, 0, 0, 0644, -, \ /usr/plugins/sqldrivers/libqsqlite.$(QT4_PLUGIN_EXT)) endif
signature.asc
Description: This is a digitally signed message part.
-- ptxdist mailing list [email protected]
