Skip to content

Commit

Permalink
Use brew --prefix instead of assuming it's in /usr/local
Browse files Browse the repository at this point in the history
  • Loading branch information
grigorescu committed Apr 10, 2016
1 parent 5c4b203 commit 2ad0277
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions MacDependencyPaths.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ if (APPLE AND "${PROJECT_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
endif ()

if (MAC_HBREW_BIN)
list(INSERT CMAKE_PREFIX_PATH 0 /usr/local) # Homebrew, if linked
list(INSERT CMAKE_PREFIX_PATH 0 /usr/local/opt/openssl) # Homebrew OpenSSL
execute_process(COMMAND ${MAC_HBREW_BIN} "--prefix" OUTPUT_VARIABLE BREW_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
list(INSERT CMAKE_PREFIX_PATH 0 ${BREW_PREFIX}) # Homebrew, if linked
list(INSERT CMAKE_PREFIX_PATH 0 ${BREW_PREFIX}/opt/openssl) # Homebrew OpenSSL
endif ()

if (MAC_FINK_BIN)
Expand Down

0 comments on commit 2ad0277

Please sign in to comment.