Re: Xcode 4 - public headers path from subproject from build directory
Re: Xcode 4 - public headers path from subproject from build directory
- Subject: Re: Xcode 4 - public headers path from subproject from build directory
- From: Rory O'Bryan <email@hidden>
- Date: Mon, 11 Apr 2011 21:11:22 +0100
Hi,
I'm not aware of any special variable that can point you from one project build folder into another. I think you'll need some level of hard coding to do that.
Another option that I worked through recently, in Xcode 4, was using a workspace with a single Xcode controlled build folder. The defaults in Xcode 4 will put all the different projects build products into a single location. Once everything is in the same folder you don't need to jump over into the other projects build folders to find headers etc. So you can do without the hardcoding and just use the standard build variables in your header paths (I just picked ones that looked right then double checked in the documentation that they were what they seemed to be. $(CONFIGURATION_BUILD_DIR) was useful for instance)
If you are using Xcode 4 and want to look into this alternative, and also find out about some other potential "gotchas" with static libraries, I tried to document my setup in the dev forum here..
https://devforums.apple.com/message/414408#414408
and then here when I realised the first solution didn't work !
https://devforums.apple.com/message/414778#414778
Spoiler: One problem means you can't use the public headers functionality in your static library anyway as it causes problems with the archiving step for the App Store. The other problem is to do with the build setting "Skip Install" in the static library which must be set to "YES" for the same reason.
Regards,
Rory O'Bryan
On 11 Apr 2011, at 20:22, Robert Vojta wrote:
> Hallo all,
>
> I'm puzzled and maybe I'm overlooking something. I have two projects - let's name it MyLib (iOS static library) and MyApp (iOS application, which does use MyLib). Both projects are set up in this way:
>
> [1] MyLib
>
> - output public headers path is set to /usr/local/include/libMyLib
> - public headers are placed in build/Release-iphoneos/usr/local/include/libMyLib after successfull build
>
> [2] MyApp
>
> - group Dependencies does contain MyLib Xcode project
> - target dependency is setup
> - linking is setup
> - headers path to MyLib is set as relative path to MyLib project source code directory
>
> So far, so good, everything does work perfectly.
>
> The problem is that it points to MyLib source code tree directly and I do not want this. I want to use MyLib headers from MyLib/build/Release-iphoneos/usr/local/include/libMyLib directory.
>
> Is there a way how to do this? Some environment variable to use in header search path? Any idea? Without hardcoding Release-iphoneos, build, ... into this path?
>
> Regards,
> Robert Vojta
>
>
>
> _______________________________________________
> 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