PDA

View Full Version : Qmake + Xcode + Dependencies?



amnesiac
2nd June 2008, 15:48
Hi,

I'd like to use Qmake for my project. It contains one main .pro file and several sub projects with its own .pro files. So I use Qmake to generate .xcodeproj files out of each .pro file.

To have the dependencies in Xcode I need to drag and drop the .xcodeproj files of the sub projects into my main Xcode project and tell Xcode about the dependencies.

So my question is, can't Qmake do this stuff for me? Or maybe there is someone having a script that modifies the Xcode file after it has been created?

Greetings,
André

lyuts
2nd June 2008, 15:59
Looks like qmake's spec flag could be helpful:


qmake -spec macx-xcode you_project.pro

amnesiac
3rd June 2008, 10:20
Looks like qmake's spec flag could be helpful:


qmake -spec macx-xcode you_project.pro

That's what I do to generate Xcode projects. But dependencies to any subprojects are not taken into account. I've found a solution for Visual Studio:

http://trolltech.com/developer/task-tracker/index_html?method=entry&id=79706

But this does not seem to work for Xcode.

Regards,
André

keeney
6th June 2008, 13:45
I've never used qmake with Xcode and subprojects, only cmake. But maybe this could help


The 'subdirs' template

The 'subdirs' template tells qmake to generate a makefile that will go into the specified subdirectories and generate a makefile for the project file in the directory and call make on it.

The only system variable that is recognised for this template is the SUBDIRS variable. This variable contains a list of all the subdirectories that contain project files to be processed. It is essential that the project file in the sub directory has the same name as the subdirectory, so that qmake can find it. For example, if the subdirectory is called 'myapp' then the project file in that directory should be called myapp.pro in that directory.