Skip to content

Commit 9d2e084

Browse files
committed
jpeg-linux
1 parent c2e755d commit 9d2e084

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

external_deps/build.sh

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,14 +552,30 @@ build_jpeg() {
552552
;;
553553
esac
554554

555+
local jpeg_cmake_args=()
556+
557+
case "${PLATFORM}" in
558+
windows-*-*)
559+
;;
560+
*)
561+
# Workaround for: undefined reference to `log10'
562+
# The CMakeLists.txt file only does -lm if UNIX,
563+
# but UNIX may not be true on Linux.
564+
jpeg_cmake_args=(-DUNIX=True)
565+
;;
566+
esac
567+
555568
cd "${dir_name}"
556569

570+
# Add -lm to fix:
571+
# undefined reference to `log10'
557572
cmake_build \
558573
-DENABLE_SHARED="${LIBS_SHARED}" \
559574
-DENABLE_STATIC="${LIBS_STATIC}" \
560575
-DCMAKE_SYSTEM_NAME="${LIBS_STATIC}" \
561576
-DCMAKE_SYSTEM_PROCESSOR="${SYSTEM_PROCESSOR}" \
562-
-DWITH_JPEG8=1
577+
-DWITH_JPEG8=1 \
578+
"${jpeg_cmake_args[@]}"
563579
}
564580

565581
# Build WebP

0 commit comments

Comments
 (0)