Re: Passing Build Settings to an included (Library) project
Re: Passing Build Settings to an included (Library) project
- Subject: Re: Passing Build Settings to an included (Library) project
- From: Andreas Grosam <email@hidden>
- Date: Tue, 16 Apr 2013 15:21:23 +0200
On 15.04.2013, at 20:45, David Hoerl wrote:
> iOS app, includes a library project. In Xcode 3, I recall you could add a "User Defined" Build Setting in the app target, and through some magic incantation the included Library project would see those settings. [Then again, maybe I just dreamed I got this to work.]
>
> So, Question, is there a way to pass Build Settings from App to Library project?
IMHO, most libraries' build settings are *private* to the library. That means, another project should not be able to override settings of a library.
However, there might be cases where this seems desirable. When building the main project you might generate a "config.h" file, or alternatively an xcconfig file from some script which is then copied to the library sources which is then included later during the normal library build process.
That approach has a couple of caveats, though: locating the libraries source folder, and creating some "make" rule for the script that avoids unnecessary updates of the config.h file.
Yet another approach is to have a xcconfig file which is used by the library and which includes some "global" xcconfig file which possibly resides in some upper level location of the former xcconfig file:
// libproject.xcconfig:
#include "../../global.xcconfig"
However, that is pretty brittle, and it will break when someone changes the relative locations from these xcconfig files. (Nonetheless I've already used that, too :) )
Andreas
>
> Thanks!
>
> David
> _______________________________________________
> 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
_______________________________________________
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