Skip to content

Commit

Permalink
std_cmake_args: Search for Frameworks last
Browse files Browse the repository at this point in the history
Most Homebrew builds produce libraries, so CMake should give priority to
libraries when resolving dependencies.

Closes Homebrew#12497.

Signed-off-by: Charlie Sharpsteen <[email protected]>
  • Loading branch information
Sharpie committed Jun 3, 2012
1 parent 0d4e441 commit 467fa7c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Library/Homebrew/compat/compatibility.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def self.fails_with_llvm msg=nil, data=nil
end

def std_cmake_parameters
"-DCMAKE_INSTALL_PREFIX='#{prefix}' -DCMAKE_BUILD_TYPE=None -Wno-dev"
"-DCMAKE_INSTALL_PREFIX='#{prefix}' -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev"
end
end

Expand Down
10 changes: 9 additions & 1 deletion Library/Homebrew/formula.rb
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,18 @@ def to_s
# Standard parameters for CMake builds.
# Using Build Type "None" tells cmake to use our CFLAGS,etc. settings.
# Setting it to Release would ignore our flags.
# Setting CMAKE_FIND_FRAMEWORK to "LAST" tells CMake to search for our
# libraries before trying to utilize Frameworks, many of which will be from
# 3rd party installs.
# Note: there isn't a std_autotools variant because autotools is a lot
# less consistent and the standard parameters are more memorable.
def std_cmake_args
%W[-DCMAKE_INSTALL_PREFIX=#{prefix} -DCMAKE_BUILD_TYPE=None -Wno-dev]
%W[
-DCMAKE_INSTALL_PREFIX=#{prefix}
-DCMAKE_BUILD_TYPE=None
-DCMAKE_FIND_FRAMEWORK=LAST
-Wno-dev
]
end

def self.class_s name
Expand Down

0 comments on commit 467fa7c

Please sign in to comment.