diff options
| author | Florian Sowade | 2009-12-09 04:49:19 +0100 |
|---|---|---|
| committer | Max Howell | 2010-01-14 09:41:06 +0000 |
| commit | 056851463eadbc0c9b81ae96f6251d66ec5b64ec (patch) | |
| tree | 6003f8086bd53ac021cdbf5def0adabe9ac2e572 | |
| parent | fa2162ef6259ea0ceed22c02caea753acda291a8 (diff) | |
| download | brew-056851463eadbc0c9b81ae96f6251d66ec5b64ec.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 Homebrew/homebrew#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! |
