Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unnecessary script phase in build #40

Closed
MrNoodle opened this issue Jan 28, 2011 · 4 comments
Closed

Unnecessary script phase in build #40

MrNoodle opened this issue Jan 28, 2011 · 4 comments
Milestone

Comments

@MrNoodle
Copy link

I noticed that JSON.h has conditional compilation based on a hardcoded "1" which is replaced via a shell script build phase. Maybe I'm missing something here, but couldn't you just have it be #ifdef SOMETHING and add -DSOMETHING to the CFLAGS in the build settings for the appropriate targets? Seems less error-prone (especially since I'm seeing another issue concerning the script).

@stig
Copy link
Collaborator

stig commented Jan 28, 2011

I agree that this is a HORRIBLE HORRIBLE HACK. But I couldn't figure out another way that satisfied all these:

  • Don't force users to put -DSOMETHING in their CFLAGS
  • Works on iPhone / Mac, both when:
    • copied into your app
    • using the static lib / framework

@MrNoodle
Copy link
Author

I'm not sure if I follow. The CFLAGS would be set in the targets to build the frameworks/library. Just use #ifndef SOMETHING and if the CFLAGS aren't set (i.e. user copies the files into their own project), then it works fine.

@stig
Copy link
Collaborator

stig commented Jan 29, 2011

I couldn't make it work... Care to make a patch? :)

@MrNoodle
Copy link
Author

MrNoodle commented Feb 2, 2011

Hmm, trying it out I see where it breaks down. Though, whenever I copy third party code into my projects, I do tend to stick them into their own dir so the imports would work fine. Not sure if that is something you want to require though.

@stig stig closed this as completed in 8cabcf4 May 2, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants