[vlc-commits] modules: Don't enforce linkage to -lole32
Hugo Beauzée-Luyssen
git at videolan.org
Wed Aug 3 14:14:31 CEST 2016
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Aug 3 12:40:46 2016 +0200| [d2080f5bcca34365e64b0614619f0d1e0b67b506] | committer: Hugo Beauzée-Luyssen
modules: Don't enforce linkage to -lole32
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d2080f5bcca34365e64b0614619f0d1e0b67b506
---
configure.ac | 3 +++
modules/access/Makefile.am | 6 +++---
modules/audio_output/Makefile.am | 8 ++++----
modules/codec/Makefile.am | 8 ++++----
modules/gui/qt/Makefile.am | 2 +-
modules/text_renderer/Makefile.am | 2 +-
modules/video_output/Makefile.am | 14 +++++++-------
7 files changed, 23 insertions(+), 20 deletions(-)
diff --git a/configure.ac b/configure.ac
index 1dd5b20..3bd40d4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -308,13 +308,16 @@ AC_ARG_ENABLE(winstore_app,
vlc_winstore_app=0
AS_IF([test "${SYS}" = "mingw32"],[
+ LIBCOM="-lole32"
AS_IF([test "${enable_winstore_app}" = "yes"], [
vlc_winstore_app=1
+ LIBCOM=""
VLC_ADD_LIBS([libvlccore], [-lruntimeobject])
AC_LIBOBJ([gai_strerror])
],[
VLC_ADD_LIBS([libvlccore],[-lwinmm])
])
+ AC_SUBST(LIBCOM)
])
AC_DEFINE_UNQUOTED(VLC_WINSTORE_APP, ${vlc_winstore_app}, [Define to 1 if you want to build for Windows Store apps])
diff --git a/modules/access/Makefile.am b/modules/access/Makefile.am
index a4eadd1..5d93300 100644
--- a/modules/access/Makefile.am
+++ b/modules/access/Makefile.am
@@ -109,7 +109,7 @@ access_LTLIBRARIES += $(LTLIBaccess_qtsound)
EXTRA_LTLIBRARIES += libaccess_qtsound_plugin.la
libaccess_wasapi_plugin_la_SOURCES = access/wasapi.c
-libaccess_wasapi_plugin_la_LIBADD = -lole32 -lksuser
+libaccess_wasapi_plugin_la_LIBADD = $(LIBCOM) -lksuser
if HAVE_WASAPI
if !HAVE_WINSTORE
access_LTLIBRARIES += libaccess_wasapi_plugin.la
@@ -186,7 +186,7 @@ endif
libdshow_plugin_la_SOURCES = access/dshow/vlc_dshow.h access/dshow/dshow.cpp access/dshow/access.h \
access/dshow/filter.cpp access/dshow/filter.h access/dshow/crossbar.cpp
-libdshow_plugin_la_LIBADD = -lole32 -loleaut32 -luuid -lstrmiids -lksuser
+libdshow_plugin_la_LIBADD = $(LIBCOM) -loleaut32 -luuid -lstrmiids -lksuser
if HAVE_WIN32_DESKTOP
access_LTLIBRARIES += libdshow_plugin.la
endif
@@ -315,7 +315,7 @@ if HAVE_WIN32_DESKTOP
# Use an import library for C++ to retain C linker on other platforms.
libbda_la_SOURCES = access/dtv/bdadefs.h access/dtv/bdagraph.cpp access/dtv/bdagraph.hpp
libbda_la_LDFLAGS = -static
-libbda_la_LIBADD = -lstrmiids -lole32 -loleaut32 -luuid
+libbda_la_LIBADD = -lstrmiids $(LIBCOM) -loleaut32 -luuid
noinst_LTLIBRARIES += libbda.la
libdtv_plugin_la_DEPENDENCIES = libbda.la
diff --git a/modules/audio_output/Makefile.am b/modules/audio_output/Makefile.am
index c5e0058..ec31a06 100644
--- a/modules/audio_output/Makefile.am
+++ b/modules/audio_output/Makefile.am
@@ -58,11 +58,11 @@ aout_LTLIBRARIES += libjack_plugin.la
endif
libmmdevice_plugin_la_SOURCES = audio_output/mmdevice.c audio_output/mmdevice.h
-libmmdevice_plugin_la_LIBADD = -lole32 $(LIBM)
+libmmdevice_plugin_la_LIBADD = $(LIBCOM) $(LIBM)
libwinstore_plugin_la_SOURCES = audio_output/winstore.c audio_output/mmdevice.h
-libwinstore_plugin_la_LIBADD = -lole32
+libwinstore_plugin_la_LIBADD = $(LIBCOM)
libwasapi_plugin_la_SOURCES = audio_output/wasapi.c
-libwasapi_plugin_la_LIBADD = -lole32 -lksuser
+libwasapi_plugin_la_LIBADD = $(LIBCOM) -lksuser
if HAVE_WASAPI
aout_LTLIBRARIES += libwasapi_plugin.la
if !HAVE_WINSTORE
@@ -74,7 +74,7 @@ endif
libdirectsound_plugin_la_SOURCES = audio_output/directsound.c \
audio_output/windows_audio_common.h
-libdirectsound_plugin_la_LIBADD = -lole32
+libdirectsound_plugin_la_LIBADD = $(LIBCOM)
if HAVE_WIN32_DESKTOP
aout_LTLIBRARIES += libdirectsound_plugin.la
endif
diff --git a/modules/codec/Makefile.am b/modules/codec/Makefile.am
index bdb8894..88e7a28 100644
--- a/modules/codec/Makefile.am
+++ b/modules/codec/Makefile.am
@@ -377,7 +377,7 @@ libdxva2_plugin_la_SOURCES = \
codec/avcodec/dxva2.c codec/avcodec/directx_va.c codec/avcodec/directx_va.h \
packetizer/h264_nal.c packetizer/h264_nal.h \
packetizer/hevc_nal.c packetizer/hevc_nal.h
-libdxva2_plugin_la_LIBADD = -lole32 -lshlwapi -luuid
+libdxva2_plugin_la_LIBADD = $(LIBCOM) -lshlwapi -luuid
if HAVE_AVCODEC_DXVA2
codec_LTLIBRARIES += libdxva2_plugin.la
endif
@@ -387,7 +387,7 @@ libd3d11va_plugin_la_SOURCES = \
video_chroma/dxgi_fmt.c video_chroma/dxgi_fmt.h \
packetizer/h264_nal.c packetizer/h264_nal.h \
packetizer/hevc_nal.c packetizer/hevc_nal.h
-libd3d11va_plugin_la_LIBADD = -lole32 -luuid
+libd3d11va_plugin_la_LIBADD = $(LIBCOM) -luuid
if HAVE_WINSTORE
libd3d11va_plugin_la_LIBADD += -ld3d11
endif
@@ -547,13 +547,13 @@ libdmo_plugin_la_SOURCES = codec/dmo/dmo.c codec/dmo/dmo.h codec/dmo/buffer.c
libqsv_plugin_la_CPPFLAGS = $(AM_CPPFLAGS)
libdmo_plugin_la_LIBADD = $(LIBM)
if HAVE_WIN32
-libdmo_plugin_la_LIBADD += -lole32 -luuid
+libdmo_plugin_la_LIBADD += $(LIBCOM) -luuid
codec_LTLIBRARIES += libdmo_plugin.la
endif
libmft_plugin_la_SOURCES = codec/mft.c packetizer/h264_nal.c packetizer/h264_nal.h
if HAVE_WIN32
-libmft_plugin_la_LIBADD = -lole32 -luuid -lmfuuid -lmfplat
+libmft_plugin_la_LIBADD = $(LIBCOM) -luuid -lmfuuid -lmfplat
codec_LTLIBRARIES += libmft_plugin.la
endif
diff --git a/modules/gui/qt/Makefile.am b/modules/gui/qt/Makefile.am
index fce1ce9..8546529 100644
--- a/modules/gui/qt/Makefile.am
+++ b/modules/gui/qt/Makefile.am
@@ -20,7 +20,7 @@ libqt_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(guidir)'
if HAVE_OS2
else
if HAVE_WIN32
-libqt_plugin_la_LIBADD += -lole32 -lcomctl32 -luuid
+libqt_plugin_la_LIBADD += $(LIBCOM) -lcomctl32 -luuid
else
libqt_plugin_la_LIBADD += $(X_LIBS) $(X_PRE_LIB) -lX11
endif
diff --git a/modules/text_renderer/Makefile.am b/modules/text_renderer/Makefile.am
index a6ac52b..be98a94 100644
--- a/modules/text_renderer/Makefile.am
+++ b/modules/text_renderer/Makefile.am
@@ -57,7 +57,7 @@ endif
# SAPI TTS (win32)
libsapi_plugin_la_SOURCES = text_renderer/sapi.cpp
-libsapi_plugin_la_LIBADD = -lole32
+libsapi_plugin_la_LIBADD = $(LIBCOM)
if HAVE_SAPI
text_LTLIBRARIES += libsapi_plugin.la
endif
diff --git a/modules/video_output/Makefile.am b/modules/video_output/Makefile.am
index 9bc5d91..9898cee 100644
--- a/modules/video_output/Makefile.am
+++ b/modules/video_output/Makefile.am
@@ -163,7 +163,7 @@ libdirect2d_plugin_la_SOURCES = video_output/win32/direct2d.c \
video_output/win32/win32touch.c video_output/win32/win32touch.h
libdirect2d_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \
-DMODULE_NAME_IS_direct2d
-libdirect2d_plugin_la_LIBADD = -lgdi32 -lole32 -luuid
+libdirect2d_plugin_la_LIBADD = -lgdi32 $(LIBCOM) -luuid
libdirect2d_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(voutdir)'
if HAVE_WIN32_DESKTOP
vout_LTLIBRARIES += $(LTLIBdirect2d)
@@ -177,7 +177,7 @@ libdirect3d9_plugin_la_SOURCES = video_output/win32/direct3d9.c \
video_output/win32/win32touch.c video_output/win32/win32touch.h
libdirect3d9_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \
-DMODULE_NAME_IS_direct3d9
-libdirect3d9_plugin_la_LIBADD = -lgdi32 -lole32 -luuid
+libdirect3d9_plugin_la_LIBADD = -lgdi32 $(LIBCOM) -luuid
libdirect3d9_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(voutdir)'
if HAVE_WIN32_DESKTOP
vout_LTLIBRARIES += $(LTLIBdirect3d9)
@@ -193,9 +193,9 @@ if !HAVE_WINSTORE
libdirect3d11_plugin_la_SOURCES += video_output/win32/events.c \
video_output/win32/events.h \
video_output/win32/win32touch.c video_output/win32/win32touch.h
-libdirect3d11_plugin_la_LIBADD = -lgdi32 -lole32 -luuid
+libdirect3d11_plugin_la_LIBADD = -lgdi32 $(LIBCOM) -luuid
else
-libdirect3d11_plugin_la_LIBADD = -ld3dcompiler_47 -lole32 -luuid
+libdirect3d11_plugin_la_LIBADD = -ld3dcompiler_47 $(LIBCOM) -luuid
endif
libdirect3d11_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(voutdir)'
vout_LTLIBRARIES += $(LTLIBdirect3d11)
@@ -207,7 +207,7 @@ libdirectdraw_plugin_la_SOURCES = video_output/win32/directdraw.c \
video_output/win32/win32touch.c video_output/win32/win32touch.h
libdirectdraw_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \
-DMODULE_NAME_IS_directdraw
-libdirectdraw_plugin_la_LIBADD = -luser32 -lgdi32 -lole32 -luuid
+libdirectdraw_plugin_la_LIBADD = -luser32 -lgdi32 $(LIBCOM) -luuid
libdirectdraw_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(voutdir)'
if HAVE_WIN32_DESKTOP
vout_LTLIBRARIES += $(LTLIBdirectdraw)
@@ -227,7 +227,7 @@ libglwin32_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \
libwgl_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \
-DMODULE_NAME_IS_wgl
-libglwin32_plugin_la_LIBADD = -lopengl32 -lgdi32 -lole32 -luuid
+libglwin32_plugin_la_LIBADD = -lopengl32 -lgdi32 $(LIBCOM) -luuid
libwgl_plugin_la_LIBADD = -lopengl32 -lgdi32
libglwin32_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(voutdir)'
@@ -244,7 +244,7 @@ libwingdi_plugin_la_SOURCES = video_output/win32/wingdi.c \
video_output/win32/win32touch.c video_output/win32/win32touch.h
libwingdi_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \
-DMODULE_NAME_IS_wingdi
-libwingdi_plugin_la_LIBADD = -lgdi32 -lole32 -luuid
+libwingdi_plugin_la_LIBADD = -lgdi32 $(LIBCOM) -luuid
if HAVE_WIN32_DESKTOP
vout_LTLIBRARIES += libwingdi_plugin.la
endif
More information about the vlc-commits
mailing list