xcodebuild: passing build settings to one target in a scheme
xcodebuild: passing build settings to one target in a scheme
- Subject: xcodebuild: passing build settings to one target in a scheme
- From: Peter Hodgson <email@hidden>
- Date: Thu, 12 Jul 2012 08:59:19 -0700
Hi List,
Does anyone know if there's a way with xcodebuild to pass build settings just to the 'main' target being built, but not to any dependent targets?
I have an iOS app target which has a dependent static library target. I'd like to be able to build that app target on the command line while passing some additional linker flags. Specifically, I'm setting OTHER_LDFLAGS in order to link in a couple of extra libraries and frameworks and to enable -all_load and -ObjC.
The problem I have is that any settings I pass to xcodebuild are applied to both the dependent target and the app target. For a start this means that the static library target is being passed -all_load and -ObjC flags, which don't make any sense to it. It also means that the linker is being asked to link in extra libraries and framework to that static library.
I only want the OTHER_LDFLAGS build setting I'm passing to xcodebuild to be passed to the primary target I'm building, not to the dependent targets. I do not want to modify the xcode project itself, since I only want to link in these extra libraries for certain situations (they are test-specific libraries which I don't want in my production release). Is there any solution to this?
Cheers,
Pete Hodgson
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden