Skip to content

Commit

Permalink
Revert "⬆ [cpp-httplib] 🚨 Fix OpenSSL MacOS"
Browse files Browse the repository at this point in the history
This reverts commit a8e7269.
  • Loading branch information
JulesFouchy committed May 6, 2024
1 parent a8e7269 commit 3d5ae51
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/build_and_run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- {
name: MacOS Clang,
os: macos-12, # 13 and 14 run on M1 chips, and we get a linker error when using them
cmake_configure_args: -D CMAKE_C_COMPILER=$(brew --prefix llvm@15)/bin/clang -D CMAKE_CXX_COMPILER=$(brew --prefix llvm@15)/bin/clang++ -G Ninja -D OPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl@3.0 -D OPENSSL_INCLUDE_DIR=/opt/homebrew/opt/openssl@3.0/include,
cmake_configure_args: -D CMAKE_C_COMPILER=$(brew --prefix llvm@15)/bin/clang -D CMAKE_CXX_COMPILER=$(brew --prefix llvm@15)/bin/clang++ -G Ninja -D OPENSSL_ROOT_DIR=/usr/local/opt/openssl -D OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include,
}
build_type:
- Debug
Expand All @@ -69,16 +69,6 @@ jobs:
sudo apt-get install -y libssl-dev
sudo apt-get install -y libpulse-dev libasound2-dev
- name: Install Windows dependencies
if: runner.os == 'Windows'
run: |
choco install openssl --version=3.2.1
- name: Install MacOS dependencies
if: runner.os == 'MacOS'
run: |
brew install openssl@3.0
- name: ccache
uses: hendrikmuhs/ccache-action@main
with:
Expand Down
14 changes: 10 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,20 @@ set(COOLLAB_REQUIRE_ALL_FEATURES OFF CACHE BOOL "Some features are optional, lik
# Link OpenSSL if we find it. It will be used
# to send images to the Coollab gallery.
# If OpenSSL is not found this feature will be disabled.
# Note: cpp-httplib can only work with OpenSSL versions 3
# Note: cpp-httplib can only work with OpenSSL versions 3 or 1.1.1
# Set the path to OpenSSL library directory
set(OPENSSL_USE_STATIC_LIBS TRUE)

if(COOLLAB_REQUIRE_ALL_FEATURES)
find_package(OpenSSL 3 REQUIRED)
else()
if(NOT APPLE) # Disabled on Mac for now, because brew installs versions 3.3 now, which isn't compatible with cpp-httplib
find_package(OpenSSL 3)

if(NOT OpenSSL_FOUND)
if(COOLLAB_REQUIRE_ALL_FEATURES)
find_package(OpenSSL 1.1.1 REQUIRED)
else()
find_package(OpenSSL 1.1.1)
endif()
endif()
endif()

if(OpenSSL_FOUND)
Expand Down

0 comments on commit 3d5ae51

Please sign in to comment.