Commit d006a0f4 authored by Armin K's avatar Armin K Committed by Christophe Giboudeaux

Replace the INSTALL_QSQLITE_IN_QT_PREFIX option

We can now use the KDE_INSTALL_USE_QT_SYS_PATHS option from ECM.
Turning this option on will install the sqlite plugin in the Qt plugins dir.

REVIEW: 121069
parent 45b4735c
...@@ -40,7 +40,6 @@ find_package(Qt5Test ${QT_REQUIRED_VERSION} CONFIG REQUIRED) ...@@ -40,7 +40,6 @@ find_package(Qt5Test ${QT_REQUIRED_VERSION} CONFIG REQUIRED)
############### Build Options ############### ############### Build Options ###############
option(AKONADI_BUILD_QSQLITE "Build the Sqlite backend." TRUE) option(AKONADI_BUILD_QSQLITE "Build the Sqlite backend." TRUE)
option(INSTALL_QSQLITE_IN_QT_PREFIX "Install the QSQLite plugin in QT_PLUGIN_DIR" FALSE)
option(ENABLE_ASAN "Build Akonadi with AddressSanitzer - https://code.google.com/p/address-sanitizer/" FALSE) option(ENABLE_ASAN "Build Akonadi with AddressSanitzer - https://code.google.com/p/address-sanitizer/" FALSE)
set(SMI_MIN_VERSION "0.20") set(SMI_MIN_VERSION "0.20")
......
...@@ -31,8 +31,9 @@ The following options are available when running CMake: ...@@ -31,8 +31,9 @@ The following options are available when running CMake:
* AKONADI_BUILD_TESTS (Default: TRUE): Build the Akonadi unit tests * AKONADI_BUILD_TESTS (Default: TRUE): Build the Akonadi unit tests
* AKONADI_BUILD_QSQLITE (Default: TRUE): Build the SQLite backend * AKONADI_BUILD_QSQLITE (Default: TRUE): Build the SQLite backend
* INSTALL_QSQLITE_IN_QT_PREFIX (Default: FALSE): Useful for distributions. * KDE_INSTALL_USE_QT_SYS_PATHS (Default: FALSE): Useful for distributions.
Once enabled, the qsqlite3 backend will be installed in ${QT_PLUGINS_DIR}/sqldrivers Once enabled, the qsqlite3 backend will be installed in the sqlbackends subdirectory of the default Qt plugins directory
specified at Qt build time.
* DATABASE_BACKEND (Default: MYSQL, available: MYSQL, POSTGRES, SQLITE): Define which database driver to use by default. * DATABASE_BACKEND (Default: MYSQL, available: MYSQL, POSTGRES, SQLITE): Define which database driver to use by default.
MYSQL is preferred, SQLITE should be avoided. MYSQL is preferred, SQLITE should be avoided.
......
...@@ -7,8 +7,9 @@ these changes should be pushed upstream eventually. ...@@ -7,8 +7,9 @@ these changes should be pushed upstream eventually.
== INSTALL == == INSTALL ==
When Sqlite is found, the custom driver will be build and installed in: When Sqlite is found, the custom driver will be build and installed in:
${CMAKE_INSTALL_PREFIX}/lib/plugins/sqldrivers or ${QT_PLUGINS_DIR}/sqldrivers ${CMAKE_INSTALL_PREFIX}/lib/plugins/sqldrivers or the sqldrivers subdirectory
if you enable the INSTALL_QSQLITE_IN_QT_PREFIX option when running CMake. of the default Qt plugins path specified at Qt build time if you enable the
KDE_INSTALL_USE_QT_SYS_PATHS option when running CMake.
The next thing you have to do is add that path (if it isn't already) to your The next thing you have to do is add that path (if it isn't already) to your
QT_PLUGIN_PATH environment variable. QT_PLUGIN_PATH environment variable.
......
...@@ -6,11 +6,7 @@ set(QSqlite_SRCS ...@@ -6,11 +6,7 @@ set(QSqlite_SRCS
message(STATUS "Building QSQLITE3 driver") message(STATUS "Building QSQLITE3 driver")
if(INSTALL_QSQLITE_IN_QT_PREFIX) set(QSQLITE_INSTALL_PREFIX "${PLUGIN_INSTALL_DIR}/sqldrivers")
set(QSQLITE_INSTALL_PREFIX "${QT_PLUGINS_DIR}/sqldrivers")
else()
set(QSQLITE_INSTALL_PREFIX "${LIB_INSTALL_DIR}/plugins/sqldrivers")
endif()
include_directories( include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_SOURCE_DIR}/src
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment