aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General/kdenotify
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/General/kdenotify')
-rw-r--r--src/plugins/General/kdenotify/CMakeLists.txt11
-rw-r--r--src/plugins/General/kdenotify/kdenotify.cpp2
-rw-r--r--src/plugins/General/kdenotify/kdenotify.pro4
3 files changed, 11 insertions, 6 deletions
diff --git a/src/plugins/General/kdenotify/CMakeLists.txt b/src/plugins/General/kdenotify/CMakeLists.txt
index edee34992..c61cb35cc 100644
--- a/src/plugins/General/kdenotify/CMakeLists.txt
+++ b/src/plugins/General/kdenotify/CMakeLists.txt
@@ -7,6 +7,8 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../)
link_directories(${CMAKE_CURRENT_BINARY_DIR}/../../../qmmpui)
link_directories(${CMAKE_CURRENT_BINARY_DIR}/../../../qmmp)
+SET(libkdenotify_DEFINES APP_NAME_SUFFIX="${APP_NAME_SUFFIX}")
+
SET(libkdenotify_SRCS
kdenotify.cpp
kdenotifyfactory.cpp
@@ -30,8 +32,9 @@ QT5_WRAP_UI(libkdenotify_UIS_H ${libkdenotify_UIS})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
ADD_LIBRARY(kdenotify MODULE ${libkdenotify_SRCS} ${libkdenotify_RCC_SRCS} ${libkdenotify_UIS_H})
-add_dependencies(kdenotify qmmpui)
-target_link_libraries(kdenotify Qt5::Widgets Qt5::DBus -lqmmpui -lqmmp)
+SET_TARGET_PROPERTIES(kdenotify PROPERTIES COMPILE_DEFINITIONS "${libkdenotify_DEFINES}")
+add_dependencies(kdenotify libqmmpui)
+target_link_libraries(kdenotify Qt5::Widgets Qt5::DBus libqmmpui libqmmp)
install(TARGETS kdenotify DESTINATION ${PLUGIN_DIR}/General)
-install(FILES images/empty_cover.png DESTINATION share/qmmp/images)
-install(FILES images/app_icon.png DESTINATION share/qmmp/images)
+install(FILES images/empty_cover.png DESTINATION share/qmmp${APP_NAME_SUFFIX}/images)
+install(FILES images/app_icon.png DESTINATION share/qmmp${APP_NAME_SUFFIX}/images)
diff --git a/src/plugins/General/kdenotify/kdenotify.cpp b/src/plugins/General/kdenotify/kdenotify.cpp
index 70dfa1489..b48cf4b0f 100644
--- a/src/plugins/General/kdenotify/kdenotify.cpp
+++ b/src/plugins/General/kdenotify/kdenotify.cpp
@@ -60,7 +60,7 @@ KdeNotify::KdeNotify(QObject *parent) : QObject(parent),m_useFreedesktopSpec(fal
dir.mkdir("kdenotifycache");
dir.cd("kdenotifycache");
m_coverPath = dir.absolutePath() + "/cover.jpg";
- m_imagesDir = QDir(qApp->applicationFilePath () +"/../../share/qmmp/images").absolutePath();
+ m_imagesDir = QDir(qApp->applicationFilePath () + "/../../share/qmmp" APP_NAME_SUFFIX "/images").absolutePath();
QSettings settings(Qmmp::configFile(),QSettings::IniFormat);
settings.beginGroup("Kde_Notifier");
diff --git a/src/plugins/General/kdenotify/kdenotify.pro b/src/plugins/General/kdenotify/kdenotify.pro
index dcc7d7a62..1e8261633 100644
--- a/src/plugins/General/kdenotify/kdenotify.pro
+++ b/src/plugins/General/kdenotify/kdenotify.pro
@@ -7,6 +7,8 @@ TARGET = $$PLUGINS_PREFIX/General/kdenotify
QT += dbus
+DEFINES += APP_NAME_SUFFIX=\\\"$$APP_NAME_SUFFIX\\\"
+
SOURCES += kdenotifyfactory.cpp \
kdenotify.cpp \
settingsdialog.cpp
@@ -24,5 +26,5 @@ LIBS += $$QMMPUI_LIB
target.path = $$PLUGIN_DIR/General
images.files = images/app_icon.png \
images/empty_cover.png
-images.path = $$DATA_DIR/qmmp/images/
+images.path = $$DATA_DIR/qmmp$${APP_NAME_SUFFIX}/images/
INSTALLS += target images