craftr-build-4.x
craftr-build-4.x copied to clipboard
OSX: Ensure /usr/local/include and /usr/local/lib are handled
On my OSX machine, Clang does not respect these search paths. If you're using XCode, it will add these to the search path on the command-line automatically. It seems that sometimes, Clang will also natively respect these search paths, but I couldn't find in which cases specifically. All in all it appears to be a safe bet to include these search paths by default. For example, it is where Homebrew installs headers and libraries.
It appears that these paths are also added to the command-line by common build tools (eg. CMake) (and even on Linux with GCC??). Anyway, I also read that it yields problems when cross-compiling, thus the user should be able to disable the behaviour in Craftr.