[vlc-commits] globalhotkeys: use different names for Win32 and XCB targets
Rémi Denis-Courmont
git at videolan.org
Sun Sep 15 19:37:23 CEST 2013
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Sep 15 15:26:45 2013 +0300| [6ef248d6518300009ca7d8d1c1cd2811bc3b080a] | committer: Rémi Denis-Courmont
globalhotkeys: use different names for Win32 and XCB targets
This works around an automake limitation with multiple directory
prefixes.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6ef248d6518300009ca7d8d1c1cd2811bc3b080a
---
configure.ac | 2 +-
modules/control/Modules.am | 35 +++++++++++++++++----------------
modules/control/globalhotkeys/win32.c | 1 +
modules/control/globalhotkeys/xcb.c | 1 +
4 files changed, 21 insertions(+), 18 deletions(-)
diff --git a/configure.ac b/configure.ac
index 4633b56..8b1de34 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3059,7 +3059,7 @@ AS_IF([test "${enable_xcb}" != "no"], [
dnl xcb-utils
PKG_CHECK_MODULES(XCB_KEYSYMS, [xcb-keysyms >= 0.3.4], [
- VLC_ADD_PLUGIN([globalhotkeys])
+ VLC_ADD_PLUGIN([xcb_hotkeys])
VLC_ADD_CFLAGS([xcb_window], [-DHAVE_XCB_KEYSYMS])
], [
AC_MSG_WARN([${XCB_KEYSYMS_PKG_ERRORS}. Hotkeys will not work.])
diff --git a/modules/control/Modules.am b/modules/control/Modules.am
index 30549d8..37b9357 100644
--- a/modules/control/Modules.am
+++ b/modules/control/Modules.am
@@ -24,6 +24,12 @@ libvlc_LTLIBRARIES += \
libhotkeys_plugin.la \
liboldrc_plugin.la
+if HAVE_WIN32
+libvlc_LTLIBRARIES += libntservice_plugin.la
+else
+libvlc_LTLIBRARIES += libmotion_plugin.la
+endif
+
libdbus_plugin_la_SOURCES = \
dbus/dbus_introspect.h dbus/dbus_common.h \
dbus/dbus_root.c dbus/dbus_root.h \
@@ -36,21 +42,16 @@ if HAVE_DBUS
libvlc_LTLIBRARIES += libdbus_plugin.la
endif
-if !HAVE_WIN32
-libglobalhotkeys_plugin_la_SOURCES = globalhotkeys/xcb.c
-libglobalhotkeys_plugin_la_CFLAGS = $(AM_CFLAGS) $(XCB_KEYSYMS_CFLAGS) $(XCB_CFLAGS)
-libglobalhotkeys_plugin_la_LIBADD = $(AM_LIBADD) $(XCB_KEYSYMS_LIBS) $(XCB_LIBS)
-
-libvlc_LTLIBRARIES += \
- $(LTLIBglobalhotkeys) \
- libmotion_plugin.la
-else
-libglobalhotkeys_plugin_la_SOURCES = globalhotkeys/win32.c
-libglobalhotkeys_plugin_la_CFLAGS = $(AM_CFLAGS)
-libglobalhotkeys_plugin_la_LIBADD = $(AM_LIBADD)
-libglobalhotkeys_plugin_la_DEPENDENCIES = libglobalhotkeys_plugin.rc.o
+libxcb_hotkeys_plugin_la_SOURCES = globalhotkeys/xcb.c
+libxcb_hotkeys_plugin_la_CFLAGS = $(AM_CFLAGS) \
+ $(XCB_KEYSYMS_CFLAGS) $(XCB_CFLAGS)
+libxcb_hotkeys_plugin_la_LIBADD = $(AM_LIBADD) $(XCB_KEYSYMS_LIBS) $(XCB_LIBS)
+EXTRA_LTLIBRARIES += libxcb_hotkeys_plugin.la
+libvlc_LTLIBRARIES += $(LTLIBxcb_hotkeys)
-libvlc_LTLIBRARIES += \
- libglobalhotkeys_plugin.la \
- libntservice_plugin.la
-endif
+libwin_hotkeys_plugin_la_SOURCES = globalhotkeys/win32.c
+libwin_hotkeys_plugin_la_CFLAGS = $(AM_CFLAGS)
+libwin_hotkeys_plugin_la_LIBADD = $(AM_LIBADD)
+if HAVE_WIN32
+libvlc_LTLIBRARIES += libwin_hotkeys_plugin.la
+endif
diff --git a/modules/control/globalhotkeys/win32.c b/modules/control/globalhotkeys/win32.c
index b67ec2f..f80510e 100644
--- a/modules/control/globalhotkeys/win32.c
+++ b/modules/control/globalhotkeys/win32.c
@@ -49,6 +49,7 @@ vlc_module_begin()
set_description( N_("Global Hotkeys interface") )
set_capability( "interface", 0 )
set_callbacks( Open, Close )
+ add_shortcut( "globalhotkeys" )
vlc_module_end()
struct intf_sys_t
diff --git a/modules/control/globalhotkeys/xcb.c b/modules/control/globalhotkeys/xcb.c
index 05e5a05..8a4cca9 100644
--- a/modules/control/globalhotkeys/xcb.c
+++ b/modules/control/globalhotkeys/xcb.c
@@ -52,6 +52,7 @@ vlc_module_begin()
set_description( N_("Global Hotkeys interface") )
set_capability( "interface", 0 )
set_callbacks( Open, Close )
+ add_shortcut( "globalhotkeys" )
vlc_module_end()
typedef struct
More information about the vlc-commits
mailing list