Skip to content

Commit

Permalink
Add openssl to MacOS build scripts to enable Twitch support
Browse files Browse the repository at this point in the history
  • Loading branch information
WarmUpTill committed Sep 11, 2023
1 parent cbd459b commit 36a78f4
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/scripts/.build-deps.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,35 @@ Usage: %B${functrace[1]%:*}%b <option> [<options>]
log_info "Installing Tesseract..."
cmake --install ${tesseract_build_dir} --prefix "${advss_dep_path}" --config Release
popd
pushd ${advss_dep_path}
log_info "Prepare openssl ..."
rm -rf openssl
git clone git://git.openssl.org/openssl.git --branch openssl-3.1.2 --depth 1
mv openssl openssl_x86
cp -r openssl_x86 openssl_arm
log_info "Building openssl x86 ..."
export MACOSX_DEPLOYMENT_TARGET=10.9
cd openssl_x86
./Configure darwin64-x86_64-cc shared
make
log_info "Building openssl arm ..."
export MACOSX_DEPLOYMENT_TARGET=10.15
cd ../openssl_arm
./Configure enable-rc5 zlib darwin64-arm64-cc no-asm
make
log_info "Combine arm and x86 openssl binaries ..."
cd ..
mkdir openssl-combined
lipo -create openssl_x86/libcrypto.a openssl_arm/libcrypto.a -output openssl-combined/libcrypto.a
lipo -create openssl_x86/libssl.a openssl_arm/libssl.a -output openssl-combined/libssl.a
log_info "Clean up openssl dir..."
mv openssl_x86 openssl
rm -rf openssl_arm
;;
linux)
# Nothing to do for now
Expand Down
5 changes: 5 additions & 0 deletions .github/scripts/.build.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,17 @@ Usage: %B${functrace[1]%:*}%b <option> [<options>]
num_procs=$(( $(sysctl -n hw.ncpu) + 1 ))
local openssl_lib_dir="${advss_deps_path}/openssl-combined/"
local openssl_include_dir="${advss_deps_path}/openssl/include"
cmake_args+=(
-DCMAKE_FRAMEWORK_PATH="${_plugin_deps}/Frameworks"
-DCMAKE_OSX_ARCHITECTURES=${${target##*-}//universal/x86_64;arm64}
-DCMAKE_OSX_DEPLOYMENT_TARGET=${DEPLOYMENT_TARGET:-10.15}
-DOBS_CODESIGN_LINKER=ON
-DOBS_BUNDLE_CODESIGN_IDENTITY="${CODESIGN_IDENT:--}"
-DOPENSSL_INCLUDE_DIR="${openssl_include_dir}"
-DOPENSSL_LIBRARIES="${openssl_lib_dir}/libcrypto.a;${openssl_lib_dir}/libssl.a"
)
;;
Expand Down

0 comments on commit 36a78f4

Please sign in to comment.