Skip to content

Commit 12d46c7

Browse files
committed
png-cmake
1 parent 40f487e commit 12d46c7

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

external_deps/build.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,8 +484,16 @@ build_png() {
484484

485485
cd "${dir_name}"
486486

487-
# The default -O2 is dropped when there's user-provided CFLAGS.
488-
cmake_build
487+
local png_cmake_args=(-DPNG_SHARED=OFF -DPNG_STATIC=ON)
488+
489+
if [ "${LIBS_SHARED}" = 'ON' ]
490+
then
491+
png_cmake_args=(-DPNG_SHARED=ON -DPNG_STATIC=OFF)
492+
fi
493+
494+
cmake_build \
495+
-DPNG_EXECUTABLES=OFF \
496+
"${png_cmake_args[@]}"
489497
}
490498

491499
# Build JPEG

0 commit comments

Comments
 (0)