diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 12:08:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 12:08:18 +0000 |
commit | 5da14042f70711ea5cf66e034699730335462f66 (patch) | |
tree | 0f6354ccac934ed87a2d555f45be4c831cf92f4a /src/fluent-bit/cmake/homebrew.cmake | |
parent | Releasing debian version 1.44.3-2. (diff) | |
download | netdata-5da14042f70711ea5cf66e034699730335462f66.tar.xz netdata-5da14042f70711ea5cf66e034699730335462f66.zip |
Merging upstream version 1.45.3+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/fluent-bit/cmake/homebrew.cmake')
-rw-r--r-- | src/fluent-bit/cmake/homebrew.cmake | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/fluent-bit/cmake/homebrew.cmake b/src/fluent-bit/cmake/homebrew.cmake new file mode 100644 index 000000000..e2b32e1a9 --- /dev/null +++ b/src/fluent-bit/cmake/homebrew.cmake @@ -0,0 +1,38 @@ +# Search homebrewed keg-only versions of Bison and Flex on macOS. +execute_process( + COMMAND brew --prefix bison + RESULT_VARIABLE HOMEBREW_BISON + OUTPUT_VARIABLE HOMEBREW_BISON_PREFIX + OUTPUT_STRIP_TRAILING_WHITESPACE + ) +if (HOMEBREW_BISON EQUAL 0 AND EXISTS "${HOMEBREW_BISON_PREFIX}") + message(STATUS "Using bison keg installed by Homebrew at ${HOMEBREW_BISON_PREFIX}") + set(BISON_EXECUTABLE "${HOMEBREW_BISON_PREFIX}/bin/bison") +endif() + +execute_process( + COMMAND brew --prefix flex + RESULT_VARIABLE HOMEBREW_FLEX + OUTPUT_VARIABLE HOMEBREW_FLEX_PREFIX + OUTPUT_STRIP_TRAILING_WHITESPACE + ) +if (HOMEBREW_FLEX EQUAL 0 AND EXISTS "${HOMEBREW_FLEX_PREFIX}") + message(STATUS "Using flex keg installed by Homebrew at ${HOMEBREW_FLEX_PREFIX}") + set(FLEX_EXECUTABLE "${HOMEBREW_FLEX_PREFIX}/bin/flex") +endif() + +if (OPENSSL_ROOT_DIR) + message(STATUS "Using openssl specified by cmake option: ${OPENSSL_ROOT_DIR}") +else() + # Also, searching homebrewed OpenSSL automatically. + execute_process( + COMMAND brew --prefix openssl + RESULT_VARIABLE HOMEBREW_OPENSSL + OUTPUT_VARIABLE HOMEBREW_OPENSSL_PREFIX + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + if (HOMEBREW_OPENSSL EQUAL 0 AND EXISTS "${HOMEBREW_OPENSSL_PREFIX}") + message(STATUS "Using openssl keg installed by Homebrew at ${HOMEBREW_OPENSSL_PREFIX}") + set(OPENSSL_ROOT_DIR "${HOMEBREW_OPENSSL_PREFIX}") + endif() +endif() |