Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
alloy opened this Issue · 6 comments

2 participants

Eloy Durán Fabio Pelosin
Eloy Durán
Owner

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)
Eloy Durán
Owner

See #79

Fabio Pelosin

Closing this as apparently fixed in #79.

Eloy Durán
Owner

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

Eloy Durán alloy reopened this
Fabio Pelosin

ops, sorry.

Fabio Pelosin fabiopelosin was assigned
Eloy Durán
Owner

Somewhat related: #911.

Fabio Pelosin

Moving to #833

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.