Skip to content
This repository

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

Closed
alloy opened this Issue November 18, 2011 · 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
Owner

Closing this as apparently fixed in #79.

Fabio Pelosin irrationalfab closed this August 30, 2012
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 August 30, 2012
Fabio Pelosin
Owner

ops, sorry.

Eloy Durán
Owner
alloy commented April 02, 2013

Somewhat related: #911.

Fabio Pelosin
Owner

Moving to #833

Fabio Pelosin irrationalfab closed this May 31, 2013
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.