diff --git a/runners/services/CMakeLists.txt b/runners/services/CMakeLists.txt --- a/runners/services/CMakeLists.txt +++ b/runners/services/CMakeLists.txt @@ -10,28 +10,22 @@ CATEGORY_NAME org.kde.plasma.runner.services DEFAULT_SEVERITY Warning) -add_library(krunner_services MODULE ${krunner_services_SRCS}) -target_link_libraries(krunner_services +add_library(krunner_services_static STATIC ${krunner_services_SRCS}) +target_link_libraries(krunner_services_static KF5::CoreAddons KF5::KIOWidgets KF5::I18n KF5::Runner KF5::Service KF5::Activities ) -add_library(krunner_services_test STATIC ${krunner_services_SRCS}) -target_link_libraries(krunner_services_test - KF5::CoreAddons - KF5::KIOWidgets - KF5::I18n - KF5::Runner - KF5::Service - KF5::Activities +add_library(krunner_services MODULE plugin.cpp) +target_link_libraries(krunner_services + krunner_services_static ) -install(TARGETS krunner_services DESTINATION ${KDE_INSTALL_PLUGINDIR} ) - +install(TARGETS krunner_services DESTINATION ${KDE_INSTALL_PLUGINDIR}) install(FILES plasma-runner-services.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR}) if(BUILD_TESTING) diff --git a/runners/services/autotests/CMakeLists.txt b/runners/services/autotests/CMakeLists.txt --- a/runners/services/autotests/CMakeLists.txt +++ b/runners/services/autotests/CMakeLists.txt @@ -3,4 +3,4 @@ include(ECMAddTests) ecm_add_test(servicerunnertest.cpp TEST_NAME servicerunnertest - LINK_LIBRARIES Qt5::Test krunner_services_test) + LINK_LIBRARIES Qt5::Test krunner_services_static) diff --git a/runners/services/plugin.cpp b/runners/services/plugin.cpp new file mode 100644 --- /dev/null +++ b/runners/services/plugin.cpp @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2006 Aaron Seigo + * Copyright (C) 2014 Vishesh Handa + * Copyright (C) 2016 Harald Sitter + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License version 2 as + * published by the Free Software Foundation + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "servicerunner.h" + +K_EXPORT_PLASMA_RUNNER(services, ServiceRunner) + +#include "plugin.moc" diff --git a/runners/services/servicerunner.cpp b/runners/services/servicerunner.cpp --- a/runners/services/servicerunner.cpp +++ b/runners/services/servicerunner.cpp @@ -465,7 +465,3 @@ data->setUrls(QList{QUrl::fromLocalFile(path)}); return data; } - -K_EXPORT_PLASMA_RUNNER(services, ServiceRunner) - -#include "servicerunner.moc"