| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Segolene Tarte wrote:
| I'm a new user of MacOSX and ProjectBuilder and I'm trying to port | Qt-based C++ libraries and applications from unix to mac.
| My question is simple, and I fear the answer may not be as simple...
| How do I tell ProjectBuilder to first invoke the moc compiler before | compiling with gcc?
Your project will need two targets. Target number one will take the Qt code and run it through moc to produce the C++ source. The target should be a "tool" target, and should have every build phase deleted except a shell script to run moc. (The script can do anything a normal shell script can. You'd probably want it to run some kind of "make", to avoid reprocessing every Qt file every build. PB defines a wad of environment variables with paths to all the various interesting folders used by a build.)
Target number two will be a normal C++ tool/application/whatever-is-appropriate target, including the files produced by moc. (You'll need to run moc once to make the C++ files before adding them to the target, because you can't add not-yet-created files to a PB project.)
Once both targets are created, make target number two (the C++ files) be dependent on target number one (the Qt files), by dragging target one to below target two in the targets pane.
| Should I modify the ProcessHeader rule defined in | /Developer/Makefiles/pbx_jamfiles/ProjectBuilderJambase ?
The jambase file isn't meant for mere mortals to hack. As well, Apple replaces it each time a new version of PB comes out, so you'd have to figure out your changes all over again whenever PB was upgraded. (The same applies to Xcode, by the way, except that Xcode prefers not to use the jambase at all, and does so mainly for compatibility with older PB projects. On the other hand, Xcode may provide a more direct way to do what you want; I've not seen anything definite one way or the other.)
Glen Fisher
_______________________________________________
projectbuilder-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/projectbuilder-users
Do not post admin requests to the list. They will be ignored.
| References: | |
| >invoking Qt's moc in PB (From: Segolene Tarte <email@hidden>) | |
| >Re: invoking Qt's moc in PB (From: email@hidden) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.