f740a8bda8
This makes it easier to read, because we do not have to handle a list of files that get added to the targets. In other KDE projects, we also prefer the target centric approach. In case one wants to reuse the same category in multiple places, it would be best to create a small static lib. But for now, this is not needed.
35 lines
1.2 KiB
CMake
35 lines
1.2 KiB
CMake
if(WIN32)
|
|
set(kdeconnect_mpriscontrol_SRCS
|
|
mpriscontrolplugin-win.cpp
|
|
)
|
|
else()
|
|
set(kdeconnect_mpriscontrol_SRCS
|
|
mpriscontrolplugin.cpp
|
|
)
|
|
|
|
set_source_files_properties(
|
|
org.freedesktop.DBus.Properties.xml
|
|
org.mpris.MediaPlayer2.Player.xml
|
|
org.mpris.MediaPlayer2.xml
|
|
PROPERTIES
|
|
NO_NAMESPACE ON)
|
|
|
|
qt_add_dbus_interface(kdeconnect_mpriscontrol_SRCS org.freedesktop.DBus.Properties.xml dbusproperties)
|
|
qt_add_dbus_interface(kdeconnect_mpriscontrol_SRCS org.mpris.MediaPlayer2.Player.xml mprisplayer)
|
|
qt_add_dbus_interface(kdeconnect_mpriscontrol_SRCS org.mpris.MediaPlayer2.xml mprisroot)
|
|
|
|
endif()
|
|
|
|
kdeconnect_add_plugin(kdeconnect_mpriscontrol SOURCES ${kdeconnect_mpriscontrol_SRCS})
|
|
|
|
ecm_qt_declare_logging_category(kdeconnect_mpriscontrol
|
|
HEADER plugin_mpris_debug.h
|
|
IDENTIFIER KDECONNECT_PLUGIN_MPRIS CATEGORY_NAME kdeconnect.plugin.mpris
|
|
DEFAULT_SEVERITY Warning
|
|
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin mpris)")
|
|
if(WIN32)
|
|
target_link_libraries(kdeconnect_mpriscontrol kdeconnectcore windowsapp)
|
|
target_compile_features(kdeconnect_mpriscontrol PUBLIC cxx_std_17)
|
|
else()
|
|
target_link_libraries(kdeconnect_mpriscontrol Qt::DBus kdeconnectcore)
|
|
endif()
|