[Scons-users] Qt tools can't find generated headers using VariantDir
Strand, Kyle J
kyle.strand at beckman.com
Fri Feb 22 18:04:22 EST 2013
This is actually kind of a repeat of a question I've asked before on the mailing list, but it appears that the Qt4 and Qt5 tools don't properly handle using VariantDir with the duplicate set to false. Included in the Qt4 tool's test directory is a simple setup that uses VariantDir. If you change the VariantDir() call to have duplicate=0, the build fails with the error "Cannot open include file: 'ui_anUiFile.h': No such file or directory". I assume this is because when duplicate is set to false, SCons attempts to adjust pathnames according to whether they are targets or source files, and the paths to header files generated by the Qt tool are somehow improperly handled. The workaround I've found is to explicitly make the build directory an include path for files in the source directory, but this doesn't seem like it should be necessary. Is there a more appropriate way to make this work? Is this a bug in the Qt tools?
For reference, here's the complete SConstruct file from the Qt4 tool's test directory, with the appropriate modification to make it fail:
import qtenv
qtEnv = qtenv.createQtEnvironment()
qtEnv.EnableQt4Modules(['QtCore','QtGui'])
qtEnv.VariantDir('bld', '.',duplicate=0)
qtEnv.Uic4('bld/anUiFile.ui')
qtEnv.Program('bld/test_realqt', ['bld/mocFromCpp.cpp',
'bld/mocFromH.cpp',
'bld/MyForm.cpp',
'bld/main.cpp'])
Note that it still fails if you use the Qt5 tool instead.
________________________________
Kyle Strand, Software Intern
Beckman Coulter, Inc., Life Sciences Division
4862 Innovation Drive, Fort Collins, Colorado, 80525
(970) 204-7036
Please be advised that this email may contain confidential
information. If you are not the intended recipient, please notify us
by email by replying to the sender and delete this message. The
sender disclaims that the content of this email constitutes an offer
to enter into, or the acceptance of, any agreement; provided that the
foregoing does not invalidate the binding effect of any digital or
other electronic reproduction of a manual signature that is included
in any attachment.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20130222/1ce2ac79/attachment.htm>
More information about the Scons-users
mailing list