Skip to content

Commit

Permalink
SL-18837: Turn off minizip options causing colladadom link errors.
Browse files Browse the repository at this point in the history
Specifically, turn off MZ_ZSTD and MZ_ICONV: we don't have (and don't want to
add) the third-party libraries to support those.

Unify the minizip configuration options for all platforms so we don't have to
maintain them in three different places.
  • Loading branch information
nat-goodspeed committed Jun 2, 2023
1 parent 298f1f2 commit 3e9876e
Showing 1 changed file with 23 additions and 34 deletions.
57 changes: 23 additions & 34 deletions build-cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,24 @@ version=$(sed -n -E 's/#define MZ_VERSION[ ]+[(]"([0-9.]+)"[)]/\1/p' "${VERSION_
build=${AUTOBUILD_BUILD_ID:=0}
echo "${version}.${build}" > "${stage}/VERSION.txt"

# CMake configuration options for all platforms
config=( \
-DBUILD_SHARED_LIBS=OFF \
-DMZ_BUILD_TESTS=ON \
-DMZ_BZIP2=OFF \
-DMZ_COMPAT=ON \
-DMZ_FETCH_LIBS=OFF \
-DMZ_ICONV=OFF \
-DMZ_LIBBSD=OFF \
-DMZ_LIBCOMP=OFF \
-DMZ_LZMA=OFF \
-DMZ_OPENSSL=OFF \
-DMZ_PKCRYPT=OFF \
-DMZ_SIGNING=OFF \
-DMZ_WZAES=OFF \
-DMZ_ZSTD=OFF \
)

pushd "$MINIZLIB_SOURCE_DIR"
case "$AUTOBUILD_PLATFORM" in

Expand All @@ -46,17 +64,9 @@ pushd "$MINIZLIB_SOURCE_DIR"
load_vsvars

cmake -G "$AUTOBUILD_WIN_CMAKE_GEN" -A "$AUTOBUILD_WIN_VSPLATFORM" . \
-DBUILD_SHARED_LIBS=OFF \
-DMZ_COMPAT=ON \
-DMZ_BUILD_TEST=ON \
-DMZ_FETCH_LIBS=OFF\
-DMZ_BZIP2=OFF \
-DMZ_LIBBSD=OFF \
-DMZ_LZMA=OFF \
-DMZ_OPENSSL=OFF \
-DMZ_PKCRYPT=OFF \
-DMZ_SIGNING=OFF \
-DMZ_WZAES=OFF \
-DCMAKE_C_FLAGS:STRING="$LL_BUILD_RELEASE" \
-DCMAKE_CXX_FLAGS:STRING="$LL_BUILD_RELEASE" \
"${config[@]}" \
-DZLIB_INCLUDE_DIRS="$(cygpath -m $stage)/packages/include/zlib-ng/" \
-DZLIB_LIBRARIES="$(cygpath -m $stage)/packages/lib/release/zlib.lib"

Expand Down Expand Up @@ -100,18 +110,7 @@ pushd "$MINIZLIB_SOURCE_DIR"
cmake ../${MINIZLIB_SOURCE_DIR} -GXcode \
-DCMAKE_C_FLAGS:STRING="$(remove_cxxstd $opts)" \
-DCMAKE_CXX_FLAGS:STRING="$opts" \
-DBUILD_SHARED_LIBS=OFF \
-DMZ_COMPAT=ON \
-DMZ_BUILD_TEST=ON \
-DMZ_FETCH_LIBS=OFF \
-DMZ_BZIP2=OFF \
-DMZ_LIBBSD=OFF \
-DMZ_LZMA=OFF \
-DMZ_OPENSSL=OFF \
-DMZ_PKCRYPT=OFF \
-DMZ_SIGNING=OFF \
-DMZ_WZAES=OFF \
-DMZ_LIBCOMP=OFF \
"${config[@]}" \
-DCMAKE_INSTALL_PREFIX=$stage \
-DZLIB_INCLUDE_DIRS="$stage/packages/include/zlib-ng/" \
-DZLIB_LIBRARIES="$stage/packages/lib/release/libz.a"
Expand Down Expand Up @@ -174,17 +173,7 @@ pushd "$MINIZLIB_SOURCE_DIR"
cmake ${top}/${MINIZLIB_SOURCE_DIR} -G"Unix Makefiles" \
-DCMAKE_C_FLAGS:STRING="$(remove_cxxstd $opts)" \
-DCMAKE_CXX_FLAGS:STRING="$opts" \
-DBUILD_SHARED_LIBS=OFF \
-DMZ_COMPAT=ON \
-DMZ_BUILD_TEST=ON \
-DMZ_FETCH_LIBS=OFF \
-DMZ_BZIP2=OFF \
-DMZ_LIBBSD=OFF \
-DMZ_LZMA=OFF \
-DMZ_OPENSSL=OFF \
-DMZ_PKCRYPT=OFF \
-DMZ_SIGNING=OFF \
-DMZ_WZAES=OFF \
"${config[@]}" \
-DCMAKE_INSTALL_PREFIX=$stage \
-DZLIB_INCLUDE_DIRS="$stage/packages/include/zlib-ng/" \
-DZLIB_LIBRARIES="$stage/packages/lib/release/libz.a"
Expand Down

0 comments on commit 3e9876e

Please sign in to comment.