Skip to content

Commit 0ba8063

Browse files
committed
fix(build): enable static OpenSSL libraries in build scripts
* Added the `-DOPENSSL_USE_STATIC_LIBS=ON` flag to the CMake commands in `build-macos.sh`, `build-windows.ps1`, and the Dockerfile to ensure the use of static OpenSSL libraries during the build process. Signed-off-by: benshi <807629978@qq.com>
1 parent 77a9454 commit 0ba8063

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ RUN git clone --depth=1 -b ${ARG_BRANCH} https://github.com/ZLMediaKit/ZLMediaKi
2626

2727
WORKDIR /opt/media/ZLMediaKit/build
2828
RUN cmake -DCMAKE_BUILD_TYPE=Release \
29+
-DOPENSSL_USE_STATIC_LIBS=ON \
2930
-DENABLE_OBJCOPY=OFF \
3031
-DENABLE_WEBRTC=true \
3132
-DENABLE_FFMPEG=true .. && \

build-macos.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ cd build
8181
echo "Building ZLMediaKit for macOS..."
8282
cmake -DCMAKE_BUILD_TYPE=Release \
8383
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
84+
-DOPENSSL_USE_STATIC_LIBS=ON \
8485
-DCMAKE_OSX_ARCHITECTURES="$CMAKE_ARCH" \
8586
-DENABLE_OBJCOPY=OFF \
8687
-DENABLE_WEBRTC=true \

build-windows.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ Write-Host "Building ZLMediaKit for Windows..."
5656
cmake -S . -B build -A $cmakeArch `
5757
-DCMAKE_BUILD_TYPE=Release `
5858
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 `
59+
-DOPENSSL_USE_STATIC_LIBS=ON `
5960
-DCMAKE_TOOLCHAIN_FILE="$vcpkgRoot/scripts/buildsystems/vcpkg.cmake" `
6061
-DVCPKG_TARGET_TRIPLET="$vcpkgTriplet" `
6162
-DBUILD_TESTING=OFF `

0 commit comments

Comments
 (0)