mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Fix brew path on Apple Silicon (#1633)
* Fix brew path on Apple Silicon * code review: `brew --prefix openssl` * code review: correct mbedtls path * code review: cmake does support autodetection of OPENSSL_ROOT_DIR
This commit is contained in:
parent
3c744ceed0
commit
f516e399b4
9
.github/workflows/build.yml
vendored
9
.github/workflows/build.yml
vendored
@ -556,9 +556,6 @@ jobs:
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: |
|
||||
# NOTE: cmake does not support autodetection of OPENSSL_ROOT_DIR via brew
|
||||
export OPENSSL_ROOT_DIR=/usr/local/opt/openssl
|
||||
|
||||
if [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_OPENSSL" ]; then
|
||||
EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_OPENSSL=ON"
|
||||
|
||||
@ -583,7 +580,7 @@ jobs:
|
||||
else
|
||||
EVENT_CMAKE_OPTIONS=""
|
||||
fi
|
||||
EVENT_CMAKE_OPTIONS="$EVENT_CMAKE_OPTIONS -DMBEDTLS_ROOT_DIR=/usr/local/opt/mbedtls@2"
|
||||
EVENT_CMAKE_OPTIONS="$EVENT_CMAKE_OPTIONS -DMBEDTLS_ROOT_DIR=`brew --prefix mbedtls@2`"
|
||||
|
||||
mkdir -p build
|
||||
cd build
|
||||
@ -641,8 +638,8 @@ jobs:
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: |
|
||||
export CPPFLAGS="-I/usr/local/opt/mbedtls@2/include"
|
||||
export LDFLAGS="-L/usr/local/opt/mbedtls@2/lib"
|
||||
export CPPFLAGS="-I`brew --prefix mbedtls@2`/include"
|
||||
export LDFLAGS="-L`brew --prefix mbedtls@2`/lib"
|
||||
|
||||
./autogen.sh
|
||||
mkdir -p build
|
||||
|
@ -55,8 +55,8 @@ def link_and_run(link, code):
|
||||
if vcpkg_root is not None:
|
||||
vcpkg = f"-DCMAKE_TOOLCHAIN_FILE={vcpkg_root}/scripts/buildsystems/vcpkg.cmake"
|
||||
elif platform.system() == "Darwin":
|
||||
openssldir = '-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl'
|
||||
mbedtlsdir = '-DMBEDTLS_ROOT_DIR=/usr/local/opt/mbedtls@2'
|
||||
openssldir = '-DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl'
|
||||
mbedtlsdir = '-DMBEDTLS_ROOT_DIR=/opt/homebrew/opt/mbedtls@2'
|
||||
cmd = f"cmake .." \
|
||||
f" {arch}" \
|
||||
f" {vcpkg}" \
|
||||
|
Loading…
x
Reference in New Issue
Block a user