Create xcconfig files which can be aggregated into other xcconfig files. #80

Closed
alloy opened this Issue Nov 18, 2011 · 6 comments

Comments

Projects
None yet
2 participants
@alloy
Member

alloy commented Nov 18, 2011

When a user defines multiple targets, it could be that they will end up using two distinct target libs in one project target. This means that the user will have to be able to combine two xcconfig files to one.

It might be a good idea to generate two files per target. One which defines the actual values, but with namespaced keys and the actual xcconfig file which just imports the other one and assigns the values to the actual keys. This will allow the user to create aggregate configs from multiple target configs easily.

Target 1

Pods-definitions.xcconfig:

USER_HEADER_SEARCH_PATHS-Pods = "Pods/AFNetworking"

Pods-test.xcconfig:

#include "Pods-definitions.xcconfig"
USER_HEADER_SEARCH_PATHS = USER_HEADER_SEARCH_PATHS-Pods

Target 2

Pods-test-definitions.xcconfig:

USER_HEADER_SEARCH_PATHS-Pods-test = "Pods/Kiwi"

Pods-test.xcconfig:

#include "Pods-test-definitions.xcconfig"
USER_HEADER_SEARCH_PATHS = USER_HEADER_SEARCH_PATHS-Pods-test

Custom aggregate target

Say the user now wants to use both the Pods libs in one target, then they can easily combine the configs like so:

CustomAggregate.xcconfig:

#include "Pods-definitions.xcconfig"
#include "Pods-test-definitions.xcconfig"
USER_HEADER_SEARCH_PATHS = $(USER_HEADER_SEARCH_PATHS-Pods) $(USER_HEADER_SEARCH_PATHS-Pods-test)
@alloy

This comment has been minimized.

Show comment
Hide comment
@alloy

alloy Nov 18, 2011

Member

See #79

Member

alloy commented Nov 18, 2011

See #79

@fabiopelosin

This comment has been minimized.

Show comment
Hide comment
@fabiopelosin

fabiopelosin Aug 30, 2012

Member

Closing this as apparently fixed in #79.

Member

fabiopelosin commented Aug 30, 2012

Closing this as apparently fixed in #79.

@alloy

This comment has been minimized.

Show comment
Hide comment
@alloy

alloy Aug 30, 2012

Member

No #79 is about multiple projects in one workspace, this is about creating re-usable xcconfig files.

Member

alloy commented Aug 30, 2012

No #79 is about multiple projects in one workspace, this is about creating re-usable xcconfig files.

@alloy alloy reopened this Aug 30, 2012

@fabiopelosin

This comment has been minimized.

Show comment
Hide comment
@fabiopelosin

fabiopelosin Aug 30, 2012

Member

ops, sorry.

Member

fabiopelosin commented Aug 30, 2012

ops, sorry.

@ghost ghost assigned fabiopelosin Sep 21, 2012

@alloy

This comment has been minimized.

Show comment
Hide comment
@alloy

alloy Apr 2, 2013

Member

Somewhat related: #911.

Member

alloy commented Apr 2, 2013

Somewhat related: #911.

@fabiopelosin

This comment has been minimized.

Show comment
Hide comment
@fabiopelosin

fabiopelosin May 31, 2013

Member

Moving to #833

Member

fabiopelosin commented May 31, 2013

Moving to #833

jzapater pushed a commit to jzapater/CocoaPods that referenced this issue Sep 17, 2013

kylef pushed a commit that referenced this issue Oct 25, 2014

Kyle Fuller
Merge pull request #80 from neonichu/master
Reinstate checks for gist.github.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment