choosing boost libs to link on iPhone based on selected OS target?

I've built boost as static libs for both iPhone(ARM) and the iPhone simulator(x86). I'm trying to figure out how to configure XCode so that it will know which set of libraries to link against based on which OS target I choose in the IDE. Is there anyone with experience using boost on the iPhone that can shed some light on this? Rene?

On Apr 9, 2009, at 11:40 PM, Kenny Riddile wrote:
I've built boost as static libs for both iPhone(ARM) and the iPhone simulator(x86). I'm trying to figure out how to configure XCode so that it will know which set of libraries to link against based on which OS target I choose in the IDE. Is there anyone with experience using boost on the iPhone that can shed some light on this? Rene?
In general, that's not easy with Xcode. Have you considered creating separate build targets for each OS target? Then it's just a matter of setting the library paths for each build target, assuming you have the different versions in different places. The only other hack that I can think of is to define a library path as something like -L$(SRCROOT)/libraryLink. Then you could add a script build phase to your target whose script examines the OS that is selected (Xcode exports all the settings to the environment before running your script) and creates the libraryLink symlink to point to the proper directory. That symlink would then be followed in the link phase. - Rush
participants (2)
-
Kenny Riddile
-
Rush Manbert