diff options
author | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2013-01-24 20:32:30 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-31 15:51:03 +0100 |
commit | 839009c74f88e397f5bc6fad4dc5ce497072ef4b (patch) | |
tree | a50801f5f449bc658d36231e0a463e9db1fdafe6 /mkspecs | |
parent | 7c38be7e0c085d1d6590324f697af29734e0793d (diff) |
fix duplicated installation of qml example files
we need to collect the sources of the install targets for the check that
all files have been properly handled, but of course we must not add these
files to the source install target, as that would mean double installation.
Change-Id: I6acb56f2a993b6ed81d1031d5dc0a0da30a53b54
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/features/qt_example_installs.prf | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/mkspecs/features/qt_example_installs.prf b/mkspecs/features/qt_example_installs.prf index 5417469909..5a87eeba64 100644 --- a/mkspecs/features/qt_example_installs.prf +++ b/mkspecs/features/qt_example_installs.prf @@ -9,6 +9,22 @@ # We mean it. # +defineTest(addInstallFiles) { + for(sf, 2) { + sf = $$relative_path($$sf, $$_PRO_FILE_PWD_) + contains(sf, \\..*) { + check_examples: message("Notice: $$_PRO_FILE_ refers to $$sf") + } else { + sfp = $$replace(sf, /.*, ) + !equals(sfp, $$sf): \ + $$1 *= $$sfp + else: \ + $$1 += $$sf + } + } + export($$1) +} + probase = $$relative_path($$_PRO_FILE_PWD_, $$dirname(_QMAKE_CONF_)/examples) !isEmpty(probase):!contains(probase, ^\\..*) { for(ex, EXAMPLE_FILES): \ @@ -42,34 +58,26 @@ probase = $$relative_path($$_PRO_FILE_PWD_, $$dirname(_QMAKE_CONF_)/examples) # Just for Qt Creator OTHER_FILES += $$sourcefiles - for(inst, INSTALLS): \ - !equals(inst, target):!contains($${inst}.CONFIG, no_check_exist): \ - for(file, $${inst}.files): \ - sourcefiles += $$files($$absolute_path($$file, $$_PRO_FILE_PWD_)) sourcefiles += \ $$_PRO_FILE_ $$RC_FILE $$DEF_FILE \ $$SOURCES $$HEADERS $$FORMS $$RESOURCES $$TRANSLATIONS \ $$DBUS_ADAPTORS $$DBUS_INTERFACES - for(sf, sourcefiles) { - sf = $$relative_path($$sf, $$_PRO_FILE_PWD_) - contains(sf, \\..*) { - check_examples: message("Notice: $$_PRO_FILE_ refers to $$sf") - } else { - sfp = $$replace(sf, /.*, ) - !equals(sfp, $$sf): \ - sources.files *= $$sfp - else: \ - sources.files += $$sf - } - } + addInstallFiles(sources.files, $$sourcefiles) sources.path = $$[QT_INSTALL_EXAMPLES]/$$probase INSTALLS += sources check_examples { + srcfiles = $$sources.files + for(inst, INSTALLS): \ + !equals(inst, target):!contains($${inst}.CONFIG, no_check_exist): \ + for(file, $${inst}.files): \ + instfiles += $$files($$absolute_path($$file, $$_PRO_FILE_PWD_)) + addInstallFiles(srcfiles, $$instfiles) + thefiles = $$files($$_PRO_FILE_PWD_/*) for(i, thefiles): \ allfiles += $$relative_path($$i, $$_PRO_FILE_PWD_) - for(i, sources.files): \ + for(i, srcfiles): \ allfiles -= $$relative_path($$i, $$_PRO_FILE_PWD_) for(i, SUBDIRS) { sd = $$eval($${i}.file) |