Commit 633beafa authored by David Faure's avatar David Faure
Browse files

Ensure that qsqlite3.so is found in the builddir while running tests.

* Port KF5AkonadiMacros to ecm_add_test
* Set the output directory (in the builddir) for the plugin, as
documented on https://community.kde.org/Guidelines_and_HOWTOs/Making_apps_run_uninstalled

Result:
QT_DEBUG_PLUGINS=1 shows
QLibraryPrivate::load loaded library ".../akonadi/build-asan/bin/sqldrivers/libqsqlite3.so"
parent 0d0dbfca
......@@ -20,8 +20,7 @@ function(add_akonadi_isolated_test)
cmake_parse_arguments(CONFIG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
set(_test ${CONFIG_SOURCE})
get_filename_component(_name ${CONFIG_SOURCE} NAME_WE)
add_executable(${_name} ${_test} ${CONFIG_ADDITIONAL_SOURCES})
ecm_mark_as_test(${_name})
ecm_add_test(TEST_NAME ${_name} ${_test} ${CONFIG_ADDITIONAL_SOURCES})
target_link_libraries(${_name}
Qt5::Test Qt5::Gui Qt5::Widgets Qt5::Network KF5::KIOCore
KF5::AkonadiCore KF5::AkonadiPrivate KF5::DBusAddons
......
......@@ -17,6 +17,8 @@ include_directories(
add_library(qsqlite3 SHARED ${QSqlite_SRCS} ${QSqlite_MOC_SRCS})
set_target_properties(qsqlite3 PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/sqldrivers")
target_link_libraries(qsqlite3
Qt5::Core
Qt5::Sql
......
Supports Markdown
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