Bug 341376 - -DINSTALL_QSQLITE_IN_QT_PREFIX=ON don't set the libqsqlite3.so path in KF5 environment (${QT_PLUGINS_DIR})
Summary: -DINSTALL_QSQLITE_IN_QT_PREFIX=ON don't set the libqsqlite3.so path in KF5 en...
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: GIT (master)
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-28 20:20 UTC by Gustavo Alvarez
Modified: 2014-12-17 19:20 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gustavo Alvarez 2014-11-28 20:20:09 UTC
when build akonadi from git in KF5 environment, 

if -DINSTALL_QSQLITE_IN_QT_PREFIX=ON is passed, the libqsqlite3.so is installed in '/sqldriver/libqsqlite3.so', instead of a '${QT_PLUGINS_DIR}/sqldriver/libqsqlite3.so'

thit is because '-DINSTALL_QSQLITE_IN_QT_PREFIX=ON' don't set 'QT_PLUGINS_DIR' variable in KF5 environment

adding  '-DKDE_INSTALL_USE_QT_SYS_PATHS=ON' don't work (make nothing)

a ugly workground is change 

'${QT_PLUGINS_DIR}'

to

'${CMAKE_INSTALL_PLUGINDIR}'

in 'akonadi/src/qsqlite/CMakeLists.txt'

and add

    -DINSTALL_QSQLITE_IN_QT_PREFIX=ON
    -DCMAKE_INSTALL_PLUGINDIR=lib/qt/plugins

in the cmake options.

also have a little typos in cmake options comments like 'QT_PLUGIN_DIR' instead of 'QT_PLUGINS_DIR'.

greetings

Reproducible: Always

Steps to Reproduce:
1. download akonadi from git (master branch) and have installed and working KF5 stuff
2. add -DINSTALL_QSQLITE_IN_QT_PREFIX=ON in a cmake options
3. view the files installed
4. add -DKDE_INSTALL_USE_QT_SYS_PATHS=ON in a cmake options and rebuild
5. view nothing is changed

Actual Results:  
install in wrong path, in my case

'/usr/lib/plugins/sqldriver/libqsqlite3.so' without '-DINSTALL_QSQLITE_IN_QT_PREFIX=ON'
'/sqldriver/libqsqlite3.so' with '-DINSTALL_QSQLITE_IN_QT_PREFIX=ON'

Expected Results:  
install in correct path

in my case '/usr/lib/qt/plugins/sqldriver/libqsqlite3.so' with '-DINSTALL_QSQLITE_IN_QT_PREFIX=ON'

┌─┤[$]|[sl1pkn07]|[sL1pKn07]|[~/aplicaciones/akonadi-git/src/akonadi]|
└───╼  grep -R QT_PLUGINS_DIR
src/qsqlite/CMakeLists.txt:    set(QSQLITE_INSTALL_PREFIX "${QT_PLUGINS_DIR}/sqldrivers")
README.sqlite:${CMAKE_INSTALL_PREFIX}/lib/plugins/sqldrivers or ${QT_PLUGINS_DIR}/sqldrivers
INSTALL:  Once enabled, the qsqlite3 backend will be installed in ${QT_PLUGINS_DIR}/sqldrivers
┌─┤[$]|[sl1pkn07]|[sL1pKn07]|[~/aplicaciones/akonadi-git/src/akonadi]|
└───╼  grep -R KDE_INSTALL_USE_QT_SYS_PATHS
┌─┤[$]|[sl1pkn07]|[sL1pKn07]|[~/aplicaciones/akonadi-git/src/akonadi]|

KDE_INSTALL_USE_QT_SYS_PATHS (-DKDE_INSTALL_USE_QT_SYS_PATHS) is allowed by cmake but not QT_PLUGINS_DIR (-DQT_PLUGINS_DIR)