Commit 382d63a7 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Makefile.am: Generate qrc files from qml

This automatically tracks modifications to QML files, and will rebuild
a resource file out of it
parent 21ff127c
......@@ -2,7 +2,7 @@ ACLOCAL_AMFLAGS = -I m4
bin_PROGRAMS = vlmc
SUFFIXES = .ui .h .moc.cpp
SUFFIXES = .ui .h .moc.cpp .qrc .qml
vlmc_SOURCES = \
src/Commands/Commands.cpp \
......@@ -130,8 +130,6 @@ nodist_vlmc_SOURCES = \
vlmc_RC = \
$(top_srcdir)/resources.qrc \
$(top_srcdir)/src/Gui/timeline/resources-timeline.qrc \
$(top_srcdir)/src/Gui/effectsengine/resources-effects.qrc \
$(NULL)
EXTRA_DIST = $(vlmc_RC)
......@@ -394,9 +392,12 @@ vlmc_QML = \
EXTRA_DIST += $(vlmc_QML)
vlmc_RC += $(vlmc_QML:.qml=.qrc)
nodist_vlmc_SOURCES += $(vlmc_QML:.qml=.qrc)
endif
resources.cpp:
resources.cpp: $(vlmc_QML)
$(RCC) -o $@ $(vlmc_RC)
nodist_vlmc_SOURCES += resources.cpp
......@@ -418,6 +419,17 @@ uic_verbose__0 = $(uic_verbose_0)
$(AM_V_at)mkdir -p $(@D)
$(uic_verbose)$(UIC) -p $< -o $@
qmlrc_verbose = $(qmlrc_verbose_$(V))
qmlrc_verbose_ = $(qmlrc_verbose__$(AM_DEFAULT_VERBOSITY))
qmlrc_verbose_0 = @echo " QML->QRC " $@;
qmlrc_verbose__0 = $(qmlrc_verbose_0)
.qml.qrc:
$(AM_V_at)mkdir -p $(@D)
$(qmlrc_verbose)echo "<RCC><qresource prefix=\"/QML\">\
<file alias=\"$(<F)\">$(abs_top_builddir)/$<</file>\
</qresource></RCC>" > $@
BUILT_SOURCES = $(nodist_vlmc_SOURCES)
CLEANFILES = $(BUILT_SOURCES)
<RCC>
<qresource prefix="/QML">
<file>EffectsListView.qml</file>
<file>Effect.qml</file>
</qresource>
</RCC>
<RCC>
<qresource lang="QML" prefix="/QML">
<file>main.qml</file>
<file>Ruler.qml</file>
<file>Track.qml</file>
<file>TrackContainer.qml</file>
<file>Marker.qml</file>
<file>Cursor.qml</file>
<file>Clip.qml</file>
<file>ClipContextMenu.qml</file>
<file>PropertyButton.qml</file>
<file>MarkerContextMenu.qml</file>
</qresource>
</RCC>
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