chore: automatically detect openssl on macos#485
Open
Spockkk0225 wants to merge 4 commits into
Open
Conversation
zhanglei1949
requested changes
Jun 4, 2026
|
|
||
| find_package(Threads REQUIRED) | ||
|
|
||
| # macOS: auto-detect Homebrew OpenSSL path (arm64 uses /opt/homebrew, x86_64 uses /usr/local) |
Member
There was a problem hiding this comment.
There seems to be multiple find_package(OpenSSL) in our CMakeLists, maybe we should replace all find_package(OpenSSL) with a new macro, which ensure OpenSSL in correctly found.
https://github.com/search?q=repo%3Aalibaba%2Fneug+find_package%28OpenSSL&type=code
zhanglei1949
reviewed
Jun 4, 2026
| find_package(Threads REQUIRED) | ||
|
|
||
| # macOS: auto-detect Homebrew OpenSSL path (arm64 uses /opt/homebrew, x86_64 uses /usr/local) | ||
| if (APPLE AND NOT OPENSSL_ROOT_DIR) |
Member
There was a problem hiding this comment.
Maybe we should do find_package(OpenSSL) if OPENSSL_ROOT_DIR 1is not specified, then set the prefix to OPENSSL_ROOT_DIR. This should be done in BuildBrpcxxx.cmake
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While building on macos, it will detect real OpenSSL path and set OPENSSL_ROOT_DIR to brpc.
fix #484