From 4b224816aa2902e10835a560d14e305cfdc32bac Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 21 May 2015 10:15:36 +0200 Subject: [PATCH] support specifying directories in RESOURCES Change-Id: Ie97b26dd8ccf33d7f2a72bc6a5aec478b196ebb6 Reviewed-by: Rainer Keller Reviewed-by: hjk --- mkspecs/features/resources.prf | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/mkspecs/features/resources.prf b/mkspecs/features/resources.prf index 7a38ff8f38..1f04c8b0d7 100644 --- a/mkspecs/features/resources.prf +++ b/mkspecs/features/resources.prf @@ -49,9 +49,15 @@ for(resource, RESOURCES) { for(file, $${resource}.files) { abs_path = $$absolute_path($$file, $$_PRO_FILE_PWD_) - alias = $$relative_path($$abs_path, $$abs_base) - resource_file_content += \ - "$$xml_escape($$abs_path)" + files = $$files($$abs_path/*, true) + isEmpty(files): \ + files = $$abs_path + for (file, files) { + exists($$file/*): next() # exclude directories + alias = $$relative_path($$file, $$abs_base) + resource_file_content += \ + "$$xml_escape($$file)" + } } resource_file_content += \