2

I have a preprocessor constant called TARGET_NAME holding the current target name. I want to import a certain header file depending on the target name, e.g. include "App-Config.h" when TARGET_NAME is set to App-Config. How am I going to achieve this?

0

1 Answer 1

2

I think you could use

#if TARGET_NAME == yourtargetname
#import "App-Config.h"
#endif

I have not used this yet but assuming your target's name is in TARGET_NAME this should work

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.