-
Notifications
You must be signed in to change notification settings - Fork 454
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adsk contrib - Fix issue with minizip build (#1725)
* - Refactoring how OCIO search for minizip-ng. The first step is to search for an external minizip-ng. If not found, search for minizip-ng with MZ_COMPAT=ON (libminizip). If it is not found either, download and install minizip-ng with MZ_COMPAT=OFF. - Removing the minizip-ng part for the includes for minizip-ng headers. Signed-off-by: Cédrik Fuoco <[email protected]> * Update comments Signed-off-by: Cédrik Fuoco <[email protected]> * Improved find_package in Config mode (adding it back) Added missing scripts to install minizip-ng and zlib for the analysis workflow Signed-off-by: Cédrik Fuoco <[email protected]> * Adding +x permissions for install_minizip_ng and zlib Fixing path to find zlib in install_minizip-ng.sh Signed-off-by: Cédrik Fuoco <[email protected]> * Changing target name to match the one used by minizip-ng library (+ using the imported target instead of creating a new one when minizip-ng is found) Signed-off-by: Cédrik Fuoco <[email protected]> Signed-off-by: Cédrik Fuoco <[email protected]> Co-authored-by: Doug Walker <[email protected]> (cherry picked from commit 811902b)
- Loading branch information
1 parent
69ed32a
commit 139e36f
Showing
10 changed files
with
479 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/usr/bin/env bash | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# Copyright Contributors to the OpenColorIO Project. | ||
|
||
set -ex | ||
|
||
MINIZIPNG_VERSION="$1" | ||
INSTALL_TARGET="$2" | ||
|
||
MINIZIPNG_MAJOR_MINOR=$(echo "${MINIZIPNG_VERSION}" | cut -d. -f-2) | ||
MINIZIPNG_MAJOR=$(echo "${MINIZIPNG_VERSION}" | cut -d. -f-1) | ||
MINIZIPNG_MINOR=$(echo "${MINIZIPNG_MAJOR_MINOR}" | cut -d. -f2-) | ||
MINIZIPNG_PATCH=$(echo "${MINIZIPNG_VERSION}" | cut -d. -f3-) | ||
MINIZIPNG_VERSION_U="${MINIZIPNG_MAJOR}.${MINIZIPNG_MINOR}.${MINIZIPNG_PATCH}" | ||
|
||
git clone https://github.com/zlib-ng/minizip-ng | ||
cd minizip-ng | ||
|
||
if [ "$MINIZIPNG_VERSION" == "latest" ]; then | ||
LATEST_TAG=$(git describe --abbrev=0 --tags) | ||
git checkout tags/${LATEST_TAG} -b ${LATEST_TAG} | ||
else | ||
git checkout tags/${MINIZIPNG_VERSION_U} -b ${MINIZIPNG_VERSION_U} | ||
fi | ||
|
||
mkdir build | ||
cd build | ||
|
||
cmake -DCMAKE_BUILD_TYPE=Release \ | ||
${INSTALL_TARGET:+"-DCMAKE_INSTALL_PREFIX="${INSTALL_TARGET}""} \ | ||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \ | ||
-DBUILD_SHARED_LIBS=OFF \ | ||
-DMZ_OPENSSL=OFF \ | ||
-DMZ_LIBBSD=OFF \ | ||
-DMZ_BUILD_TESTS=OFF \ | ||
-DMZ_COMPAT=OFF \ | ||
-DMZ_BZIP2=OFF \ | ||
-DMZ_LZMA=OFF \ | ||
-DMZ_LIBCOMP=OFF \ | ||
-DMZ_ZSTD=OFF \ | ||
-DMZ_PKCRYPT=OFF \ | ||
-DMZ_WZAES=OFF \ | ||
-DMZ_SIGNING=OFF \ | ||
-DMZ_ZLIB=ON \ | ||
-DMZ_ICONV=OFF \ | ||
-DMZ_FETCH_LIBS=OFF \ | ||
-DMZ_FORCE_FETCH_LIBS=OFF \ | ||
-DZLIB_LIBRARY=${INSTALL_TARGET}/${CMAKE_INSTALL_LIBDIR} \ | ||
-DZLIB_INCLUDE_DIR=${INSTALL_TARGET}/include \ | ||
../. | ||
cmake --build . \ | ||
--target install \ | ||
--config Release \ | ||
--parallel 2 | ||
|
||
cd ../.. | ||
rm -rf minizip-ng |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/env bash | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# Copyright Contributors to the OpenColorIO Project. | ||
|
||
set -ex | ||
|
||
ZLIB_VERSION="$1" | ||
INSTALL_TARGET="$2" | ||
|
||
ZLIB_MAJOR_MINOR=$(echo "${ZLIB_VERSION}" | cut -d. -f-2) | ||
ZLIB_MAJOR=$(echo "${ZLIB_VERSION}" | cut -d. -f-1) | ||
ZLIB_MINOR=$(echo "${ZLIB_MAJOR_MINOR}" | cut -d. -f2-) | ||
ZLIB_PATCH=$(echo "${ZLIB_VERSION}" | cut -d. -f3-) | ||
ZLIB_VERSION_U="${ZLIB_MAJOR}.${ZLIB_MINOR}.${ZLIB_PATCH}" | ||
|
||
git clone https://github.com/madler/zlib | ||
cd zlib | ||
|
||
if [ "$ZLIB_VERSION" == "latest" ]; then | ||
LATEST_TAG=$(git describe --abbrev=0 --tags) | ||
git checkout tags/${LATEST_TAG} -b ${LATEST_TAG} | ||
else | ||
git checkout tags/v${ZLIB_VERSION_U} -b v${ZLIB_VERSION_U} | ||
fi | ||
|
||
mkdir build | ||
cd build | ||
|
||
cmake -DCMAKE_BUILD_TYPE=Release \ | ||
${INSTALL_TARGET:+"-DCMAKE_INSTALL_PREFIX="${INSTALL_TARGET}""} \ | ||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \ | ||
-DBUILD_SHARED_LIBS=OFF \ | ||
../. | ||
cmake --build . \ | ||
--target install \ | ||
--config Release \ | ||
--parallel 2 | ||
|
||
cd ../.. | ||
rm -rf zlib |
Oops, something went wrong.