Hi, I have a question about scope tests in .pro files. The following .pro file behaves a bit differently than I expected:
files =\ foo.cpp \ foo.h \ bar.cpp \ bar.h for(file, files) { contains(file, '.*.h') { message(header = $$file) HEADERS *= $$file } contains(file, '.*.cpp') { message(source = $$file) SOURCES *= $$file } } When I run this in Qt Creator I see the messages as I would expect: Project MESSAGE: source = foo.cpp Project MESSAGE: header = foo.h etc... It runs through everything twice, but that's becuause it generates both debug and realease I guess. However, the problem is that all the files are added to both HEADERS and SOURCES. It appears that the HEADERS and SOURCES assignments simply ignore the contains()-check, even though they are placed inside the scopes of these checks? What am I doing wrong here? - Thomas
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest