]> git.sesse.net Git - vlc/blob - modules/gui/qt4/Modules.am
Build system fixes + cleanup
[vlc] / modules / gui / qt4 / Modules.am
1 ## Howto
2 # For each Q_OBJECT:
3 #   - Add it without extension to TOMOC
4 #   - Add the moc.cpp to BUILT_SOURCES and nodist_SOURCES_qt4
5 #   - Add the cpp to SOURCES_qt4
6 #   - Add the hpp to EXTRA_DIST
7 # For each UI
8 #   - Add it without extension to TOUI
9 #   - Add it to EXTRA_DIST
10
11 AUTOMAKE_OPTIONS = subdir-objects
12
13 TOUI = ui/input_stats
14 UIH := $(TOUI:%=%.h)
15
16 TOMOC = main_interface \
17         dialogs_provider \
18         input_manager \
19         dialogs/playlist \
20         dialogs/streaminfo \
21         components/infopanels \
22         util/input_slider
23 MOCCPP := $(TOMOC:%=%.moc.cpp)
24
25 UIC = uic
26
27 nodist_SOURCES_qt4 = \
28                 main_interface.moc.cpp \
29                 dialogs_provider.moc.cpp \
30                 input_manager.moc.cpp \
31                 dialogs/playlist.moc.cpp \
32                 dialogs/streaminfo.moc.cpp \
33                 components/infopanels.moc.cpp \
34                 util/input_slider.moc.cpp
35
36 if ENABLE_QT4
37 BUILT_SOURCES += $(UIH) $(nodist_SOURCES_qt4)
38 endif
39
40
41 $(MOCCPP): %.moc.cpp: %.hpp
42         @echo "MOC $< -> $@"
43         $(MOC) -o $@ $<
44
45 $(UIH): %.h: %.ui
46         $(install_sh) -d ui
47         @echo "UIC $< -> $@"
48         rm -f $@
49         echo "#define Q_(a,b) _(a)" > $@
50         $(UIC) -tr "Q_" $< >> $@
51
52
53 SOURCES_qt4 =   qt4.cpp \
54                 main_interface.cpp \
55                 dialogs_provider.cpp \
56                 input_manager.cpp \
57                 dialogs/playlist.cpp \
58                 dialogs/streaminfo.cpp \
59                 components/infopanels.cpp \
60                 util/input_slider.cpp
61                 $(NULL)
62
63 EXTRA_DIST += \
64         qt4.hpp \
65         main_interface.hpp \
66         dialogs_provider.hpp \
67         input_manager.hpp \
68         dialogs/playlist.hpp \
69         dialogs/streaminfo.hpp \
70         components/infopanels.hpp \
71         util/input_slider.hpp \
72         ui/input_stats.ui
73