[vlc-commits] add an option to generate and keep PDB files
Steve Lhomme
git at videolan.org
Thu Apr 2 11:05:30 CEST 2020
npapi-vlc | branch: 3.0.x | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Mar 30 15:39:18 2020 +0200| [b452bf32f7f961bbe2136939e73117fa917aeea1] | committer: Steve Lhomme
add an option to generate and keep PDB files
Similar to how it's done in VLC
> https://code.videolan.org/videolan/npapi-vlc/commit/b452bf32f7f961bbe2136939e73117fa917aeea1
---
activex/Makefile.am | 5 +++++
configure.ac | 14 ++++++++++++++
npapi/Makefile.am | 5 +++++
3 files changed, 24 insertions(+)
diff --git a/activex/Makefile.am b/activex/Makefile.am
index d358b23..df66cc8 100644
--- a/activex/Makefile.am
+++ b/activex/Makefile.am
@@ -73,6 +73,11 @@ axvlc_la_LDFLAGS = -Wl,--kill-at -Wl,$(DATA_axvlc_rc) \
-Wc,--static -Wc,-static-libgcc
axvlc_la_LIBADD = ../common/libvlcplugin_common.la \
$(LIBVLC_LIBS) $(ACTIVEX_LIBS)
+if ENABLE_PDB
+# libtool magic path
+axvlc_la_DATA = .libs/axvlc.pdb
+axvlc_ladir = /lib
+endif
DATA_axvlc_rc = $(noinst_axvlc_rc_DATA)
diff --git a/configure.ac b/configure.ac
index 6836770..d9ed0fe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -280,6 +280,20 @@ AS_IF([ test "x$gtk_found" = "xyes" ],
AM_CONDITIONAL(WITH_GTK, [ test "x$gtk_found" = "xyes" ])
AM_CONDITIONAL(HAVE_XCB, [ test "x$xcb_found" = "xyes" ])
+vlc_build_pdb=0
+AC_ARG_ENABLE([pdb],
+ AS_HELP_STRING([--enable-pdb],
+ [Build PDB files for windows targets (default off)]))
+AS_IF([test "${SYS}" = "mingw32"],[
+ AS_IF([test "${enable_pdb}" = "yes"], [
+ vlc_build_pdb=1
+ AX_APPEND_FLAG([-g -gcodeview],[CFLAGS])
+ AX_APPEND_FLAG([-g -gcodeview],[CXXFLAGS])
+ LDFLAGS="${LDFLAGS} -Wl,-pdb="
+ ],[])
+])
+AM_CONDITIONAL([ENABLE_PDB], [test "$vlc_build_pdb" = "1"])
+
dnl
dnl final flags for ActiveX
AM_COND_IF([HAVE_WIN32], [
diff --git a/npapi/Makefile.am b/npapi/Makefile.am
index db3158f..a4227d2 100644
--- a/npapi/Makefile.am
+++ b/npapi/Makefile.am
@@ -41,6 +41,11 @@ npvlc_la_SOURCES = $(libvlcplugin_la_SOURCES)
npvlc_la_DEPENDENCIES = $(libvlcplugin_la_DEPENDENCIES)
npvlc_la_LIBADD = $(libvlcplugin_la_LIBADD)
npvlc_la_LDFLAGS = $(libvlcplugin_la_LDFLAGS)
+if ENABLE_PDB
+# libtool magic path
+npvlc_la_DATA = .libs/npvlc.pdb
+npvlc_ladir = /lib
+endif
npapi-sdk:
wget https://storage.googleapis.com/google-code-archive-source/v2/code.google.com/npapi-sdk/source-archive.zip
More information about the vlc-commits
mailing list