Since the API is the same, you should be able to build Qt's SQLITE driver with SQLCipher without modifications. The only caveats are,
- library and header file names are the same, and are available, and
- you initialize crypto parameters manually with the SQLCipher's PRAGMA directives before you can access any data
http://sqlcipher.net/sqlcipher-api/
If you are on Linux and cannot (or do not want to) modify system, then modify configure script under sqlite) case, such that it finds sqlcipher headers and link with correct libsqlcipher library. For example, this change allows me to build SQLite plugin with SQLCipher instead,
--- a/configure
+++ b/configure
@@ -4736,12 +4736,12 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do
if [ "$CFG_SQL_sqlite" != "no" ]; then
SQLITE_AUTODETECT_FAILED="no"
if [ "$CFG_SQLITE" = "system" ]; then
- if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists sqlite3 2>/dev/null; then
+ if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists sqlite3override 2>/dev/null; then
QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
else
- QT_CFLAGS_SQLITE=
- QT_LFLAGS_SQLITE="-lsqlite3 -lz"
+ QT_CFLAGS_SQLITE="-I/usr/include/sqlcipher"
+ QT_LFLAGS_SQLITE="-lsqlcipher -lz"
fi
if compileTest unix/sqlite "SQLite" $QT_LFLAGS_SQLITE $QT_CFLAGS_SQLITE; then
if [ "$CFG_SQL_sqlite" = "auto" ]; then
Then you need to configure with -system-sqlite