kdeplasma-addons: proper fix for the inter-depency of kcm_krunner_charrunner and krunner_charrunner targets

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-09-27 19:39:37 +03:00
parent 40be583e14
commit b6ba0b8a5b
5 changed files with 45 additions and 12 deletions

View file

@ -1,15 +1,11 @@
project(CharacterRunner)
# avoid putting the generated files in target specific
# directory which is the case when automated
set(CMAKE_AUTOUIC OFF)
# We add our source code here
set(krunner_charrunner_SRCS charrunner.cpp)
set(kcm_krunner_charrunner_SRCS
charrunner_config.cpp
)
qt4_wrap_ui(kcm_krunner_charrunner_SRCS charrunner_config.ui)
kde4_add_plugin(kcm_krunner_charrunner ${kcm_krunner_charrunner_SRCS})
target_link_libraries(kcm_krunner_charrunner
${KDE4_KDECORE_LIBS}
@ -22,8 +18,16 @@ target_link_libraries(kcm_krunner_charrunner
# Now make sure all files get to the right place
kde4_add_plugin(krunner_charrunner ${krunner_charrunner_SRCS})
target_link_libraries(krunner_charrunner ${KDE4_PLASMA_LIBS} ${KDE4_KIO_LIBS})
add_dependencies(krunner_charrunner kcm_krunner_charrunner)
# Install the library and .desktop file
install(TARGETS krunner_charrunner kcm_krunner_charrunner DESTINATION ${KDE4_PLUGIN_INSTALL_DIR})
install(FILES CharacterRunner.desktop CharRunner_config.desktop DESTINATION ${KDE4_SERVICES_INSTALL_DIR})
install(
TARGETS krunner_charrunner kcm_krunner_charrunner
DESTINATION ${KDE4_PLUGIN_INSTALL_DIR}
)
install(
FILES
CharacterRunner.desktop
CharRunner_config.desktop
DESTINATION ${KDE4_SERVICES_INSTALL_DIR}
)

View file

@ -18,6 +18,7 @@
*/
#include "charrunner.h"
#include "charrunnerdefs.h"
#include <KIcon>

View file

@ -21,7 +21,6 @@
#define CHARRUNNER_H
#include <Plasma/AbstractRunner>
#include "charrunner_config.h"
class CharacterRunner : public Plasma::AbstractRunner
{
@ -32,7 +31,7 @@ class CharacterRunner : public Plasma::AbstractRunner
~CharacterRunner();
void match(Plasma::RunnerContext &context);
void reloadConfiguration();
private:
//config-variables
QString m_triggerWord;
@ -42,4 +41,4 @@ class CharacterRunner : public Plasma::AbstractRunner
K_EXPORT_PLASMA_RUNNER(charrunner, CharacterRunner)
#endif
#endif // CHARRUNNER_H

View file

@ -55,4 +55,5 @@ class CharacterRunnerConfig : public KCModule
private:
CharacterRunnerConfigForm* m_ui;
};
#endif
#endif // CHARRUNNERCONFIG_H

View file

@ -0,0 +1,28 @@
/* Copyright 2010 Anton Kreuzkamp <akreuzkamp@web.de>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) version 3, or any
* later version accepted by the membership of KDE e.V. (or its
* successor approved by the membership of KDE e.V.), which shall
* act as a proxy defined in Section 6 of version 3 of the license.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CHARRUNNERDEFS_H
#define CHARRUNNERDEFS_H
//Names of config-entries
static const char CONFIG_TRIGGERWORD[] = "triggerWord";
static const char CONFIG_ALIASES[] = "aliases";
static const char CONFIG_CODES[] = "codes";
#endif // CHARRUNNERDEFS_H