1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

Fix installing and loading plugins

This commit is contained in:
David Rosca 2017-10-27 14:08:49 +02:00
parent d3f4b59d66
commit 9c3f38fa11
14 changed files with 23 additions and 12 deletions

View File

@ -25,6 +25,13 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
if (UNIX AND NOT APPLE)
set(FALKON_INSTALL_PLUGINDIR "${KDE_INSTALL_PLUGINDIR}/falkon")
else()
set(FALKON_INSTALL_PLUGINDIR "${KDE_INSTALL_PLUGINDIR}")
endif()
add_definitions(-DPLUGIN_PATH=\"${CMAKE_INSTALL_PREFIX}/${FALKON_INSTALL_PLUGINDIR}\")
# Version (TODO: move to a generated header once qmake support is dropped, to avoid full recompilations when changing this # Version (TODO: move to a generated header once qmake support is dropped, to avoid full recompilations when changing this
add_definitions(-DFALKON_VERSION=\"${PROJECT_VERSION}\") add_definitions(-DFALKON_VERSION=\"${PROJECT_VERSION}\")

View File

@ -94,6 +94,10 @@ void DataPaths::init()
#endif #endif
m_paths[AppData].append(QStandardPaths::standardLocations(QStandardPaths::AppDataLocation)); m_paths[AppData].append(QStandardPaths::standardLocations(QStandardPaths::AppDataLocation));
#if defined(PLUGIN_PATH)
m_paths[Plugins].append(QStringLiteral(PLUGIN_PATH));
#endif
for (const QString &location : qAsConst(m_paths[AppData])) { for (const QString &location : qAsConst(m_paths[AppData])) {
initAssetsIn(location); initAssetsIn(location);
} }

View File

@ -15,6 +15,6 @@ set( AccessKeysNavigation_RSCS
qt5_add_resources(RSCS ${AccessKeysNavigation_RSCS}) qt5_add_resources(RSCS ${AccessKeysNavigation_RSCS})
add_library(AccessKeysNavigation MODULE ${AccessKeysNavigation_SRCS} ${UIS} ${RSCS}) add_library(AccessKeysNavigation MODULE ${AccessKeysNavigation_SRCS} ${UIS} ${RSCS})
install(TARGETS AccessKeysNavigation DESTINATION ${KDE_INSTALL_PLUGINDIR}) install(TARGETS AccessKeysNavigation DESTINATION ${FALKON_INSTALL_PLUGINDIR})
target_link_libraries(AccessKeysNavigation FalkonPrivate) target_link_libraries(AccessKeysNavigation FalkonPrivate)

View File

@ -16,6 +16,6 @@ set( AutoScroll_RSCS
qt5_add_resources(RSCS ${AutoScroll_RSCS}) qt5_add_resources(RSCS ${AutoScroll_RSCS})
add_library(AutoScroll MODULE ${AutoScroll_SRCS} ${UIS} ${RSCS}) add_library(AutoScroll MODULE ${AutoScroll_SRCS} ${UIS} ${RSCS})
install(TARGETS AutoScroll DESTINATION ${KDE_INSTALL_PLUGINDIR}) install(TARGETS AutoScroll DESTINATION ${FALKON_INSTALL_PLUGINDIR})
target_link_libraries(AutoScroll FalkonPrivate) target_link_libraries(AutoScroll FalkonPrivate)

View File

@ -16,6 +16,6 @@ set( FlashCookieManager_RSCS
qt5_add_resources(RSCS ${FlashCookieManager_RSCS}) qt5_add_resources(RSCS ${FlashCookieManager_RSCS})
add_library(FlashCookieManager MODULE ${FlashCookieManager_SRCS} ${UIS} ${RSCS}) add_library(FlashCookieManager MODULE ${FlashCookieManager_SRCS} ${UIS} ${RSCS})
install(TARGETS FlashCookieManager DESTINATION ${KDE_INSTALL_PLUGINDIR}) install(TARGETS FlashCookieManager DESTINATION ${FALKON_INSTALL_PLUGINDIR})
target_link_libraries(FlashCookieManager FalkonPrivate) target_link_libraries(FlashCookieManager FalkonPrivate)

View File

@ -11,6 +11,6 @@ set( GnomeKeyringPasswords_RSCS
qt5_add_resources(RSCS ${GnomeKeyringPasswords_RSCS}) qt5_add_resources(RSCS ${GnomeKeyringPasswords_RSCS})
add_library(GnomeKeyringPasswords MODULE ${GnomeKeyringPasswords_SRCS} ${RSCS}) add_library(GnomeKeyringPasswords MODULE ${GnomeKeyringPasswords_SRCS} ${RSCS})
install(TARGETS GnomeKeyringPasswords DESTINATION ${KDE_INSTALL_PLUGINDIR}) install(TARGETS GnomeKeyringPasswords DESTINATION ${FALKON_INSTALL_PLUGINDIR})
target_link_libraries(GnomeKeyringPasswords ${GNOME_KEYRING_LIBRARIES} FalkonPrivate) target_link_libraries(GnomeKeyringPasswords ${GNOME_KEYRING_LIBRARIES} FalkonPrivate)

View File

@ -28,6 +28,6 @@ set( GreaseMonkey_RSCS
qt5_add_resources(RSCS ${GreaseMonkey_RSCS}) qt5_add_resources(RSCS ${GreaseMonkey_RSCS})
add_library(GreaseMonkey MODULE ${GreaseMonkey_SRCS} ${UIS} ${RSCS}) add_library(GreaseMonkey MODULE ${GreaseMonkey_SRCS} ${UIS} ${RSCS})
install(TARGETS GreaseMonkey DESTINATION ${KDE_INSTALL_PLUGINDIR}) install(TARGETS GreaseMonkey DESTINATION ${FALKON_INSTALL_PLUGINDIR})
target_link_libraries(GreaseMonkey FalkonPrivate) target_link_libraries(GreaseMonkey FalkonPrivate)

View File

@ -15,6 +15,6 @@ set( ImageFinder_RSCS
qt5_add_resources(RSCS ${ImageFinder_RSCS}) qt5_add_resources(RSCS ${ImageFinder_RSCS})
add_library(ImageFinder MODULE ${ImageFinder_SRCS} ${UIS} ${RSCS}) add_library(ImageFinder MODULE ${ImageFinder_SRCS} ${UIS} ${RSCS})
install(TARGETS ImageFinder DESTINATION ${KDE_INSTALL_PLUGINDIR}) install(TARGETS ImageFinder DESTINATION ${FALKON_INSTALL_PLUGINDIR})
target_link_libraries(ImageFinder FalkonPrivate) target_link_libraries(ImageFinder FalkonPrivate)

View File

@ -9,6 +9,6 @@ set( KWalletPasswords_RSCS
qt5_add_resources(RSCS ${KWalletPasswords_RSCS}) qt5_add_resources(RSCS ${KWalletPasswords_RSCS})
add_library(KWalletPasswords MODULE ${KWalletPasswords_SRCS} ${RSCS}) add_library(KWalletPasswords MODULE ${KWalletPasswords_SRCS} ${RSCS})
install(TARGETS KWalletPasswords DESTINATION ${KDE_INSTALL_PLUGINDIR}) install(TARGETS KWalletPasswords DESTINATION ${FALKON_INSTALL_PLUGINDIR})
target_link_libraries(KWalletPasswords FalkonPrivate KF5::Wallet) target_link_libraries(KWalletPasswords FalkonPrivate KF5::Wallet)

View File

@ -27,6 +27,6 @@ qt5_add_resources(RSCS ${MouseGestures_RSCS})
KDE_ENABLE_EXCEPTIONS() KDE_ENABLE_EXCEPTIONS()
add_library(MouseGestures MODULE ${MouseGestures_SRCS} ${UIS} ${RSCS}) add_library(MouseGestures MODULE ${MouseGestures_SRCS} ${UIS} ${RSCS})
install(TARGETS MouseGestures DESTINATION ${KDE_INSTALL_PLUGINDIR}) install(TARGETS MouseGestures DESTINATION ${FALKON_INSTALL_PLUGINDIR})
target_link_libraries(MouseGestures FalkonPrivate) target_link_libraries(MouseGestures FalkonPrivate)

View File

@ -15,6 +15,6 @@ set( PIM_RSCS
qt5_add_resources(RSCS ${PIM_RSCS}) qt5_add_resources(RSCS ${PIM_RSCS})
add_library(PIM MODULE ${PIM_SRCS} ${UIS} ${RSCS}) add_library(PIM MODULE ${PIM_SRCS} ${UIS} ${RSCS})
install(TARGETS PIM DESTINATION ${KDE_INSTALL_PLUGINDIR}) install(TARGETS PIM DESTINATION ${FALKON_INSTALL_PLUGINDIR})
target_link_libraries(PIM FalkonPrivate) target_link_libraries(PIM FalkonPrivate)

View File

@ -26,6 +26,6 @@ set( StatusBarIcons_RSCS
qt5_add_resources(RSCS ${StatusBarIcons_RSCS}) qt5_add_resources(RSCS ${StatusBarIcons_RSCS})
add_library(StatusBarIcons MODULE ${StatusBarIcons_SRCS} ${UIS} ${RSCS}) add_library(StatusBarIcons MODULE ${StatusBarIcons_SRCS} ${UIS} ${RSCS})
install(TARGETS StatusBarIcons DESTINATION ${KDE_INSTALL_PLUGINDIR}) install(TARGETS StatusBarIcons DESTINATION ${FALKON_INSTALL_PLUGINDIR})
target_link_libraries(StatusBarIcons FalkonPrivate) target_link_libraries(StatusBarIcons FalkonPrivate)

View File

@ -20,6 +20,6 @@ set( TabManager_RSCS
qt5_add_resources(RSCS ${TabManager_RSCS}) qt5_add_resources(RSCS ${TabManager_RSCS})
add_library(TabManager MODULE ${TabManager_SRCS} ${UIS} ${RSCS}) add_library(TabManager MODULE ${TabManager_SRCS} ${UIS} ${RSCS})
install(TARGETS TabManager DESTINATION ${KDE_INSTALL_PLUGINDIR}) install(TARGETS TabManager DESTINATION ${FALKON_INSTALL_PLUGINDIR})
target_link_libraries(TabManager FalkonPrivate) target_link_libraries(TabManager FalkonPrivate)

View File

@ -4,6 +4,6 @@ set( TestPlugin_SRCS
) )
add_library(TestPlugin MODULE ${TestPlugin_SRCS} ${RSCS}) add_library(TestPlugin MODULE ${TestPlugin_SRCS} ${RSCS})
install(TARGETS TestPlugin DESTINATION ${KDE_INSTALL_PLUGINDIR}) install(TARGETS TestPlugin DESTINATION ${FALKON_INSTALL_PLUGINDIR})
target_link_libraries(TestPlugin FalkonPrivate) target_link_libraries(TestPlugin FalkonPrivate)