Update: It appears that a recent XCode update may have changed this macro, please see this Question & Answer for more information: Obtaining older SDKROOT behavior in XCode
Situation: I'm using libxml2 on an iPhone project and I've added it as relative to the SDK version. However, in order to actually use it in the project, it needs to be added to the Header Search Paths in the Project Settings.
I would like this to be entirely SDK version agnostic, so the header search path should also be relative to SDK version, however there's no apparent way to do expand a variable representing the SDK folder.
For example, here's the actual literal path:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/include/libxml2
I'd like to be able to express
$MAGICAL_BASE_SDK_VARIABLE/usr/include/libxml2
Is this something that can be accomplished using XCode?
Figures that I'd figure this out an hour after fighting it and only 3 minutes after posting it.
The macro to use in this situation is ${SDKROOT}. Therefore, all one needs to do is add a Header Search Path like: "${SDKROOT}/usr/include/libxml2", and it will resolve appropriately.
Note the code isn't totally working yet, but it's clear that it's at least picking up the location of the header files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With