openframeworks / openFrameworks

openFrameworks is a community-developed cross platform toolkit for creative coding in C++.
http://openframeworks.cc
Other
9.9k stars 2.55k forks source link

project generator ADDON_CFLAGS only sets C++ Flags in Xcode #3430

Closed danomatika closed 9 years ago

danomatika commented 9 years ago

ADDON_CFLAGS in addon_config.mk actually sets the Other C++ Flags in Xcode. This is fine for C++ libs but does't work when compiling C libs.

For instance, ofxPd uses libpd which is a C library and requires a couple of defines to be set to build correctly. Those flags have to be set in Other C Flags to work in Xcode but they are only set in Other C++ Flags, so generated projects do not work.

The real fix would require two variables: ADDON_CFLAGS and ADDON_CPPFLAGS. Naturally, all add ons would need to be updated to use the new ADDON_CPPFLAGS variable, so this may not be the easiest solution.

bilderbuchi commented 9 years ago

pinging @arturoc @bakercp

danomatika commented 9 years ago

Any interest in this? Still a showstopper for ofxPd.

The easiest solution would be to introduce a new variable for the CFlags like ADDON_C_CFLAGS or ADDON_LOW_CFLAGS or some variant.

bakercp commented 9 years ago

Definitely interested, just not enough bandwidth at the moment ...

danomatika commented 9 years ago

Ok, have this working in the PG: https://github.com/ofZach/projectGeneratorSimple/pull/62. Will add Makefile support now. I decided on ADDON_PURECFLAGS which I think is clear enough.

danomatika commented 9 years ago

FIx for this is in: https://github.com/openframeworks/openFrameworks/pull/3573

danomatika commented 9 years ago

This is basically done with my core PR and the PG PR.

bilderbuchi commented 9 years ago

thanks Dan, closing, then.