Commit 631ba3aa authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Build system fixes + cleanup

parent 1fa283fd
...@@ -4611,10 +4611,11 @@ AC_ARG_ENABLE(qt4, ...@@ -4611,10 +4611,11 @@ AC_ARG_ENABLE(qt4,
[ --enable-qt4 QT 4 support (default disabled) ], [ --enable-qt4 QT 4 support (default disabled) ],
[if test "${enable_qt4}" = "yes"; then [if test "${enable_qt4}" = "yes"; then
PKG_CHECK_MODULES(QT4, QtCore QtGui, PKG_CHECK_MODULES(QT4, QtCore QtGui,
[ VLC_ADD_PLUGINS([qt4]) [ VLC_ADD_PLUGINS([qt4])
enableqt4=true enableqt4=true
VLC_ADD_LDFLAGS([qt4],[$QT4_LIBS]) VLC_ADD_LDFLAGS([qt4],[$QT4_LIBS])
VLC_ADD_CXXFLAGS([qt4],[$QT4_CFLAGS])], VLC_ADD_CXXFLAGS([qt4],[$QT4_CFLAGS])
MOC=moc],
[AC_MSG_WARN(QT4 library not found)]) [AC_MSG_WARN(QT4 library not found)])
fi]) fi])
AM_CONDITIONAL(ENABLE_QT4, test "$enableqt4" = "true") AM_CONDITIONAL(ENABLE_QT4, test "$enableqt4" = "true")
......
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
# - Add it without extension to TOUI # - Add it without extension to TOUI
# - Add it to EXTRA_DIST # - Add it to EXTRA_DIST
AUTOMAKE_OPTIONS = subdir-objects
TOUI = ui/input_stats TOUI = ui/input_stats
UIH := $(TOUI:%=%.h) UIH := $(TOUI:%=%.h)
...@@ -20,10 +22,9 @@ TOMOC = main_interface \ ...@@ -20,10 +22,9 @@ TOMOC = main_interface \
util/input_slider util/input_slider
MOCCPP := $(TOMOC:%=%.moc.cpp) MOCCPP := $(TOMOC:%=%.moc.cpp)
if ENABLE_QT4 UIC = uic
BUILT_SOURCES += $(UIH) nodist_SOURCES_qt4 = \
BUILT_SOURCES += \
main_interface.moc.cpp \ main_interface.moc.cpp \
dialogs_provider.moc.cpp \ dialogs_provider.moc.cpp \
input_manager.moc.cpp \ input_manager.moc.cpp \
...@@ -32,26 +33,22 @@ BUILT_SOURCES += \ ...@@ -32,26 +33,22 @@ BUILT_SOURCES += \
components/infopanels.moc.cpp \ components/infopanels.moc.cpp \
util/input_slider.moc.cpp util/input_slider.moc.cpp
if ENABLE_QT4
BUILT_SOURCES += $(UIH) $(nodist_SOURCES_qt4)
endif
$(MOCCPP): %.moc.cpp: %.hpp $(MOCCPP): %.moc.cpp: %.hpp
@echo "MOC $< -> $@" @echo "MOC $< -> $@"
moc -o $@ $< $(MOC) -o $@ $<
$(UIH): %.h: %.ui $(UIH): %.h: %.ui
$(install_sh) -d ui
@echo "UIC $< -> $@" @echo "UIC $< -> $@"
rm -f $@ rm -f $@
echo "#define Q_(a,b) _(a)" > $@ echo "#define Q_(a,b) _(a)" > $@
uic -tr "Q_" $< >> $@ $(UIC) -tr "Q_" $< >> $@
nodist_SOURCES_qt4 = \
main_interface.moc.cpp \
dialogs_provider.moc.cpp \
input_manager.moc.cpp \
dialogs/playlist.moc.cpp \
dialogs/streaminfo.moc.cpp \
components/infopanels.moc.cpp \
util/input_slider.moc.cpp
endif
SOURCES_qt4 = qt4.cpp \ SOURCES_qt4 = qt4.cpp \
main_interface.cpp \ main_interface.cpp \
...@@ -73,3 +70,4 @@ EXTRA_DIST += \ ...@@ -73,3 +70,4 @@ EXTRA_DIST += \
components/infopanels.hpp \ components/infopanels.hpp \
util/input_slider.hpp \ util/input_slider.hpp \
ui/input_stats.ui ui/input_stats.ui
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment