dash/cmake_modules/BrewHelper.cmake
Kittywhiskers Van Gogh 3bc4b00e69 Squashed 'src/dashbls/' content from commit 66ee820fbc
git-subtree-dir: src/dashbls
git-subtree-split: 66ee820fbc9e3b97370db8c164904af48327a124
2022-12-30 00:59:17 +05:30

22 lines
419 B
CMake

# Copyright (c) 2018 The Bitcoin developers
find_program(BREW brew)
function(find_brew_prefix VAR NAME)
if(NOT BREW)
return()
endif()
if(DEFINED ${VAR})
return()
endif()
execute_process(
COMMAND ${BREW} --prefix ${NAME}
OUTPUT_VARIABLE PREFIX
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(${VAR} ${PREFIX} PARENT_SCOPE)
endfunction()