Add openframeworks in an existing xcode project

Hi guys,

Usually I use a copy of the “emptyExample” to create a new openframeworks project, but in this case I need to add openframeworks in an existing xcode project.

Do you know how can I add it?



This is a good question.
I don’t know the complete answer, but I think this will do it:

You will need to set several settings in the “Project Settings” for all your configurations to point to whatever headers you will need. If you have your project in the apps directory in the OF folder, you can just copy and paste it from one of the examples.
Here are the settings I think you’ll need:
HEADER_SEARCH_PATHS = (too long to type here)

The rest you probably don’t need

Then you will need to add the openFrameworks.a file to your project (in the /libs/openFrameworksCompiles/lib/ dir) using right click on an folder in your project and then “add existing files”. There is also openFrameworksDebug.a in this directory. Either one will get your project to link, but one has slow but useful debug info, so I recommend linking openFrameworks.a with your release and openFrameworksDebug.a with your debug. You can do this by adding both files and then unchecking the checkbox of the one you don’t want to link with each target.

That should be enough, if you get troubles let me know. I haven’t done what you’re trying to do yet, but I’ve had to figure out how to get OF projects to run when they aren’t in the apps directory, which involves tweaking similar settings.