diff options
| author | Florian Sowade | 2009-12-09 04:49:19 +0100 |
|---|---|---|
| committer | Max Howell | 2010-01-14 09:41:06 +0000 |
| commit | a4ba5b6bf6ee8dc10e619a4e8eef430c97fa49b9 (patch) | |
| tree | cc7a1c94a6287d1e1416d2d464bba6e68c859d2c | |
| parent | 1d45abdaff8806d23f5059b410a3c9f4e80c6783 (diff) | |
| download | homebrew-a4ba5b6bf6ee8dc10e619a4e8eef430c97fa49b9.tar.bz2 | |
Added CMAKE_PREFIX_PATH to environment valriables
CMake ignores the CPPFLAGS and LDFLAGS environment variables. This makes sure CMake finds libraries when homebrew is not installed at /usr/local.
Signed-off-by: Max Howell <max@methylblue.com>
Fixes #242
| -rw-r--r-- | Library/Homebrew/extend/ENV.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb index 7cd519936..b652be242 100644 --- a/Library/Homebrew/extend/ENV.rb +++ b/Library/Homebrew/extend/ENV.rb @@ -36,6 +36,8 @@ module HomebrewEnvExtension # /usr/local is already an -isystem and -L directory so we skip it ENV['CPPFLAGS'] = "-isystem #{HOMEBREW_PREFIX}/include" ENV['LDFLAGS'] = "-L#{HOMEBREW_PREFIX}/lib" + # CMake ignores the variables above + ENV['CMAKE_PREFIX_PATH'] = "#{HOMEBREW_PREFIX}" else # ignore existing build vars, thus we should have less bugs to deal with ENV['CPPFLAGS'] = '' @@ -169,6 +171,8 @@ module HomebrewEnvExtension # CPPFLAGS are the C-PreProcessor flags, *not* C++! append 'CPPFLAGS', '-I/usr/X11R6/include' append 'LDFLAGS', '-L/usr/X11R6/lib' + # CMake ignores the variables above + append 'CMAKE_PREFIX_PATH', '/usr/X11R6', ':' end alias_method :libpng, :x11 # we've seen some packages fail to build when warnings are disabled! |
