[vlc-devel] [PATCH] doc: build sample apps on targets they can be built

Steve Lhomme robux4 at ycbcr.xyz
Mon May 11 12:32:24 CEST 2020


This will help keep the doc up to date as any changes in APIs not updated in
the documentation will fail to build.
---
 Makefile.am                     |  2 +-
 configure.ac                    |  3 +++
 doc/libvlc/Makefile.am          | 18 ++++++++++++++++++
 doc/libvlc/QtGL/Makefile.am     | 22 ++++++++++++++++++++++
 doc/libvlc/QtPlayer/Makefile.am | 22 ++++++++++++++++++++++
 5 files changed, 66 insertions(+), 1 deletion(-)
 create mode 100644 doc/libvlc/Makefile.am
 create mode 100644 doc/libvlc/QtGL/Makefile.am
 create mode 100644 doc/libvlc/QtPlayer/Makefile.am

diff --git a/Makefile.am b/Makefile.am
index 60ea3fb80b89..57ce9c4edae9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,7 +6,7 @@
 # something. DIST_SUBDIRS stores the directories where nothing is built but
 # which have makefiles with distribution information.
 #  - src (libvlccore) is nedeed by modules
-SUBDIRS = compat doc po share src modules lib bin test
+SUBDIRS = compat doc po share src modules lib bin doc/libvlc test
 DIST_SUBDIRS = m4 $(SUBDIRS)
 
 EXTRA_DIST = \
diff --git a/configure.ac b/configure.ac
index 4b13af45e46a..a959c23f435e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4581,6 +4581,9 @@ AC_SUBST([FILE_LIBVLC_DLL])
 AC_CONFIG_FILES([
   Makefile
   doc/Makefile
+  doc/libvlc/Makefile
+  doc/libvlc/QtGL/Makefile
+  doc/libvlc/QtPlayer/Makefile
   modules/Makefile
   m4/Makefile
   po/Makefile.in
diff --git a/doc/libvlc/Makefile.am b/doc/libvlc/Makefile.am
new file mode 100644
index 000000000000..2f663f2f6e78
--- /dev/null
+++ b/doc/libvlc/Makefile.am
@@ -0,0 +1,18 @@
+SUBDIRS = QtGL QtPlayer
+
+d3d9_player_SOURCES = d3d9_player.c
+d3d9_player_LDADD =  -ld3d9 ../../lib/libvlc.la
+d3d9_player_LDFLAGS = $(AM_LDFLAGS) -mwindows -Wc,-static
+
+d3d11_player_SOURCES = d3d11_player.cpp
+d3d11_player_LDADD =  -ld3d11 -ld3dcompiler_47 -luuid ../../lib/libvlc.la
+d3d11_player_LDFLAGS = $(AM_LDFLAGS) -mwindows -Wc,-static
+
+win_player_SOURCES = win_player.c
+win_player_LDADD =  ../../lib/libvlc.la
+win_player_LDFLAGS = $(AM_LDFLAGS) -mwindows -Wc,-static
+
+bin_PROGRAMS =
+if HAVE_WIN32
+bin_PROGRAMS += d3d11_player d3d9_player win_player
+endif
diff --git a/doc/libvlc/QtGL/Makefile.am b/doc/libvlc/QtGL/Makefile.am
new file mode 100644
index 000000000000..7933bdc6a802
--- /dev/null
+++ b/doc/libvlc/QtGL/Makefile.am
@@ -0,0 +1,22 @@
+SUFFIXES = .c .cpp .ui .h .hpp .moc.cpp
+
+moc_verbose = $(moc_verbose_$(V))
+moc_verbose_ = $(moc_verbose__$(AM_DEFAULT_VERBOSITY))
+moc_verbose_0 = @echo "  MOC   " $@;
+moc_verbose__0 = $(moc_verbose_0)
+
+nodist_qtgl_libvlc_SOURCES = qtvlcwidget.moc.cpp
+
+qtgl_libvlc_CXXFLAGS = $(AM_CXXFLAGS) $(QT_CFLAGS) $(CXXFLAGS_qt)
+qtgl_libvlc_LDADD = $(QT_LIBS) $(LIBS_qt) $(LIBM) ../../../lib/libvlc.la
+qtgl_libvlc_SOURCES = main.cpp qtvlcwidget.cpp qtvlcwidget.h
+
+qtgl_libvlc_MOC_FLAGS = $(DEFS) -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_builddir) \
+	$(qtgl_libvlc_CXXFLAGS)
+
+qtvlcwidget.moc.cpp: qtvlcwidget.h
+	$(moc_verbose)$(MOC) $(qtgl_libvlc_MOC_FLAGS) -o $@ $<
+
+if ENABLE_QT
+bin_PROGRAMS = qtgl_libvlc
+endif
diff --git a/doc/libvlc/QtPlayer/Makefile.am b/doc/libvlc/QtPlayer/Makefile.am
new file mode 100644
index 000000000000..31fe65cfd484
--- /dev/null
+++ b/doc/libvlc/QtPlayer/Makefile.am
@@ -0,0 +1,22 @@
+SUFFIXES = .c .cpp .ui .h .hpp .moc.cpp
+
+moc_verbose = $(moc_verbose_$(V))
+moc_verbose_ = $(moc_verbose__$(AM_DEFAULT_VERBOSITY))
+moc_verbose_0 = @echo "  MOC   " $@;
+moc_verbose__0 = $(moc_verbose_0)
+
+nodist_qtvlc_SOURCES = qtvlc_player.moc.cpp
+
+qtvlc_SOURCES = main.cpp player.cpp  player.h
+qtvlc_LDADD = $(QT_LIBS) $(LIBS_qt) $(LIBM) ../../../lib/libvlc.la
+qtvlc_CXXFLAGS = $(AM_CXXFLAGS) $(QT_CFLAGS) $(CXXFLAGS_qt)
+
+qtvlc_MOC_FLAGS = $(DEFS) -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_builddir) \
+	$(qtvlc_CXXFLAGS)
+
+qtvlc_player.moc.cpp: player.h
+	$(moc_verbose)$(MOC) $(qtvlc_MOC_FLAGS) -o $@ $<
+
+if ENABLE_QT
+bin_PROGRAMS = qtvlc
+endif
-- 
2.26.2



More information about the vlc-devel mailing list