Xcode 4 build Static Library dependency with different configuration setting
Asked Answered
L

2

10

I was wondering whether it is possible to have dependant static library compiled with different configuration settings.

My case was I have a project (project.pbxproj) which is dependant on a static library (cocoa touch) project (libStatic.pbxproj). My project has let say 3 configuration settings, like debug, release and ad-hoc, while my libStatic will only have 2 which is debug and release. So my question is, it is possible to have the ad-hoc configuration settings on the main project to cause the static library compiled under the release settings?

Currently I have errors on building(compiling) the project only for the ad-hoc settings, while everything runs perfectly with both the release and debug settings.

My reference on building the static library was http://blog.carbonfive.com/2011/04/04/using-open-source-static-libraries-in-xcode-4/

Thanks before

Cheers,

Lawana answered 16/11, 2011 at 13:40 Comment(1)
Nice hints here: #8524190Hoi
F
0

I do not know of a way to trigger different configuration builds, but what you are trying to achieve can be done with different targets. A target of the dependent project can trigger a specific target of the dependency project. You can set this in the Target Dependencies build phase.

Fever answered 7/9, 2012 at 14:28 Comment(0)
C
0

To extend what rage said, you'll want to use targets instead of configurations. Targets are all about what is built where as configurations is how to build.

You may also want to look at lipo. Its useful for combining static libs such as simulator and device into 1 static lib resource. I haven't played with it extensively but maybe there is a way to have different configs as well and somehow use the right config when the parent project is built.

Crackerbarrel answered 19/6, 2013 at 14:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.