Re: per-project dependent project build settings
Re: per-project dependent project build settings
- Subject: Re: per-project dependent project build settings
- From: Roland King <email@hidden>
- Date: Mon, 14 Apr 2014 07:07:44 +0800
Thats's not that far away from making an "library_10_7" target and then linking against that, which I really was trying not to do, extra target or extra build configurations are not really very scalable. I was looking to be able to say at a project level, use these settings for the project and all it's little sub-projects, at least for some of the basic ones like deployment. Like an extra level in the build settings, Default->Config->Project->Target, added in somewhere around the Config level. I'd rather hoped that's what workspace might give me, but it doesn't; I think I've never really understood what workspaces give over and above dragging dependent projects into each other.
Googling back to 2010 I find a thread on this list talking about something very similar and it seems it wasn't possible then, and that looks not to have changed. People had a variety of hacks like running the library builds as a separate command line step.
In the end, I was only using about 20 files from the library project so I removed the library import added the files directly, referenced from the other project, not re-added and built that way. Also a pretty poor solution which will bite me one day but slightly more manageable in this case.
Will fire up bug reporter again.
On 13 Apr, 2014, at 9:47 pm, Damian Carrillo <email@hidden> wrote:
> Try this:
>
> Add a new build configuration by selecting your project in the Project Navigator, selecting your project again under PROJECT, and then selecting the Info tab.
>
> Select your static library target under TARGETS, and then select OS X Deployment target under the Deployment section of the target’s Build Settings.
>
> Duplicate the scheme you use to build the library when you target OS X 10.9, but set it to use the build configuration that you just added.
>
> Since you will have diverged from Release and Debug build configurations at this point, you may have to repeat the steps in the parent project in order to have the active build settings propagate down. You could also just build your static libraries - one that targets 10.7 and one that targets 10.9 - and then from the application’s project add the library’s headers to the Header Search Path, and then just link the binary with your static library. That way you don’t need to worry about the rigmarole of having all of your settings line up all the way down.
>
> On Apr 13, 2014, at 6:39 AM, Roland King <email@hidden> wrote:
>
>> I have a huge library I've built up over time containing all my fun bits of code. That's in its own project. When I want to use the library I add the xcodeproj file into the project I want to use it in, set up a few build variables and make it a dependency and everything is fine. This is a static library, I started using it for iOS originally so static it has stayed. The final binary just links in whatever bits it needed.
>>
>> The library project is set to build to 'latest OSX', so currently 10.9, with a Deployment Target default, so again 10.9.
>>
>> I have a project I want to use the library for which needs to build with a Deployment Target of 10.7. I've imported the library project in the usual way and set all the target deployment stuff to 10.7 however the library dependency is still building with its own settings, of 10.9, which means it uses _objc_setProperty_atomic which then fails deployed on 10.7.
>>
>> Is there a way I can get the library project to build with a different Deployment Target in this one overall project? It's building its own copy of the library in the project build directory, not like it needs to share it with any other piece of code. I obviously don't want to change the deployment target of the library in the library project as that changes it for everyone, nor do I want to keep toggling it up and down when I build different projects.
>>
>> I could add a separate target, library_10_7 but that seems really hokey and unscalable. I poked around with Workspaces a bit but that didn't seem to offer more options and indeed projects there sit side-by-side with each other as top-level objects, at least in the current case the library project is 'inside' the outer one which gave me so home the 'outer' project settings could be forced into the dependencies.
>>
>> Any way I can do this?
>>
>> _______________________________________________
>> 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