tags:

views:

560

answers:

5

Simple question. Are there any tools for generating Xcode projects from the command line? We use SCons to build our cross-platform application, but that doesn't support intrinsic Xcode project generation. We'd like to avoid creating the project manually, since this would involve maintaining multiple file lists.

+1  A: 

Look at CMake. You can generate XCode projects from it automatically. I found a previous StackOverflow question about its usage here. To get it to generate an XCode project, you use it as such:

CMake -G xcode
Jared Oberhaus
Yeah, we're trying to avoid converting the project to CMake... I guess we could generate a CMakeLists.txt file from SCons, or maybe not ;)
nbolton
A: 

You could use Automator to generate them for you.

I checked and there is no prebuilt action. Therefore you would have to record your actions with Automator to do this.

Brock Woolf
Just checked out Automator, I'm not sure its what I'm looking for since it uses the GUI to perform operations. I was thinking more like a command based approach... Thanks anyway.
nbolton
A: 

qmake in the Qt toolchain generates Xcode projects. You can at least download it and take a look at its source here (LGPL).

Barry Wark
+1  A: 

I think that your question should be "Is there a way to generate an XCode project from a SCons one?". I suppose, by your asking and by reading the others, that the answer is 'no'.

SCons people should know it better. I think they will be happy if you contribute a SCons Xcode project generator.

In the meantime you may choose to switch to CMake or to create your XCode project by hand that, given a good source tree organization, may be the best pragmatic solution.

IlDan
A: 

You can use premake (http://industriousone.com/premake) to generate Xcode projects. It can also generate Visual Studio projects.

Felics