[Qt-interest] which build tools to use?
Rush Manbert
rush at manbert.com
Sat Dec 5 03:04:34 CET 2009
On Dec 4, 2009, at 11:35 AM, Glenn Hughes wrote:
> Hi all,
>
> I'm just starting in on a large Qt project, and I was wondering if anyone had opinions on the best build process to use. I'm working under OS X for now. The project has several thousand source files in dozens of directories that build into a couple of OS X Frameworks, plus several dylibs.
>
> Has anyone figured out how to build using only XCode, i.e. not involving qmake at all? I'm currently using only XCode, so this approach would probably require the smallest initial time investment (but might not be a good long-term solution).
<snip>
We do that, but we already had a big xcconfig infrastructure to support configuring our projects. If you let qmake create a Xcode project for you, you can see pretty clearly what's required, and you can move that into a Xcode config file. The tricky part is the way they invoke moc. They write a makefile into the project.xcodeproj package called qt_preprocess.mak, then invoke it using a run script build phase that runs make. I replaced that with a custom build rule:
Process: Source Files with names matching: *.h
using: Custom script
script:
/path/to/moc ${INPUT_FILE_PATH} >${INPUT_FILE_DIR}/moc_${INPUT_FILE_BASE}.cpp
with output files:
$(INPUT_FILE_DIR)/moc_$(INPUT_FILE_BASE).cpp
I only did this with a small project, so YMMV, but we're planning to put together some fairly large projects pretty soon.
- Rush
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4487 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091204/530ba03e/attachment.bin
More information about the Qt-interest-old
mailing list