mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-15 00:28:58 -05:00
Make usage of sqlcipher explicit at compile time
Either the build fails if it is not available, or the user specifies CONFIG+=NO_SQLCIPHER to build without it, even if it exists in the system.
This commit is contained in:
parent
dca295143a
commit
846f7d0204
3 changed files with 15 additions and 50 deletions
|
|
@ -138,15 +138,22 @@ linux-* {
|
||||||
DEPENDPATH += . $${SSL_DIR} $${UPNP_DIR}
|
DEPENDPATH += . $${SSL_DIR} $${UPNP_DIR}
|
||||||
INCLUDEPATH += . $${SSL_DIR} $${UPNP_DIR}
|
INCLUDEPATH += . $${SSL_DIR} $${UPNP_DIR}
|
||||||
|
|
||||||
SQLCIPHER_OK = $$system(pkg-config --exists sqlcipher && echo yes)
|
contains(CONFIG, NO_SQLCIPHER) {
|
||||||
isEmpty(SQLCIPHER_OK) {
|
DEFINES *= NO_SQLCIPHER
|
||||||
# We need a explicit path here, to force using the home version of sqlite3 that really encrypts the database.
|
LIBS *= -lsqlite3
|
||||||
!exists(../../../lib/sqlcipher/.libs/libsqlcipher.a) {
|
} else {
|
||||||
message(libsqlcipher.a not found. Compilation will not use SQLCIPER. Database will be unencrypted.)
|
SQLCIPHER_OK = $$system(pkg-config --exists sqlcipher && echo yes)
|
||||||
DEFINES *= NO_SQLCIPHER
|
isEmpty(SQLCIPHER_OK) {
|
||||||
|
# We need a explicit path here, to force using the home version of sqlite3 that really encrypts the database.
|
||||||
|
exists(../../../lib/sqlcipher/.libs/libsqlcipher.a) {
|
||||||
|
LIBS += ../../../lib/sqlcipher/.libs/libsqlcipher.a
|
||||||
|
DEPENDPATH += ../../../lib/
|
||||||
|
INCLUDEPATH += ../../../lib/
|
||||||
|
} else {
|
||||||
|
error("libsqlcipher is not installed and libsqlcipher.a not found. SQLCIPHER is necessary for encrypted database, to build with unencrypted database, run: qmake CONFIG+=NO_SQLCIPHER")
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
DEPENDPATH += ../../../lib/
|
LIBS *= -lsqlcipher
|
||||||
INCLUDEPATH += ../../../lib/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -85,27 +85,6 @@ linux-* {
|
||||||
|
|
||||||
LIBS += ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a
|
LIBS += ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a
|
||||||
|
|
||||||
SQLCIPHER_OK = $$system(pkg-config --exists sqlcipher && echo yes)
|
|
||||||
isEmpty(SQLCIPHER_OK) {
|
|
||||||
# We need a explicit path here, to force using the home version of sqlite3 that really encrypts the database.
|
|
||||||
|
|
||||||
exists(../../../lib/sqlcipher/.libs/libsqlcipher.a) {
|
|
||||||
|
|
||||||
LIBS += ../../../lib/sqlcipher/.libs/libsqlcipher.a
|
|
||||||
DEPENDPATH += ../../../lib/sqlcipher/src/
|
|
||||||
INCLUDEPATH += ../../../lib/sqlcipher/src/
|
|
||||||
DEPENDPATH += ../../../lib/sqlcipher/tsrc/
|
|
||||||
INCLUDEPATH += ../../../lib/sqlcipher/tsrc/
|
|
||||||
} else {
|
|
||||||
message(libsqlcipher.a not found. Compilation will not use SQLCIPHER. Database will be unencrypted.)
|
|
||||||
DEFINES *= NO_SQLCIPHER
|
|
||||||
LIBS *= -lsqlite3
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
LIBS += -lsqlcipher
|
|
||||||
}
|
|
||||||
|
|
||||||
LIBS *= -lglib-2.0
|
LIBS *= -lglib-2.0
|
||||||
LIBS *= -rdynamic
|
LIBS *= -rdynamic
|
||||||
DEFINES *= HAVE_XSS # for idle time, libx screensaver extensions
|
DEFINES *= HAVE_XSS # for idle time, libx screensaver extensions
|
||||||
|
|
|
||||||
|
|
@ -35,27 +35,6 @@ linux-* {
|
||||||
LIBS += -lssl -lupnp -lixml -lgnome-keyring
|
LIBS += -lssl -lupnp -lixml -lgnome-keyring
|
||||||
LIBS *= -lcrypto -ldl -lz -lpthread
|
LIBS *= -lcrypto -ldl -lz -lpthread
|
||||||
LIBS *= -rdynamic
|
LIBS *= -rdynamic
|
||||||
|
|
||||||
gxs {
|
|
||||||
SQLCIPHER_OK = $$system(pkg-config --exists sqlcipher && echo yes)
|
|
||||||
isEmpty(SQLCIPHER_OK) {
|
|
||||||
# We need a explicit path here, to force using the home version of sqlite3 that really encrypts the database.
|
|
||||||
|
|
||||||
exists(../../../lib/sqlcipher/.libs/libsqlcipher.a) {
|
|
||||||
|
|
||||||
LIBS += ../../../lib/sqlcipher/.libs/libsqlcipher.a
|
|
||||||
DEPENDPATH += ../../../lib/sqlcipher/src/
|
|
||||||
INCLUDEPATH += ../../../lib/sqlcipher/src/
|
|
||||||
} else {
|
|
||||||
message(libsqlcipher.a not found. Compilation will not use SQLCIPHER. Database will be unencrypted.)
|
|
||||||
DEFINES *= NO_SQLCIPHER
|
|
||||||
LIBS *= -lsqlite3
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
LIBS *= -lsqlcipher
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unix {
|
unix {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue