From 5af8f15a0579bc88ca4249324db8b1f19c52bbd5 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 8 Sep 2021 20:53:50 +0300 Subject: SL-14541 Replace zlib with zlib-ng --- autobuild.xml | 332 ++++++++++++++--------------------- indra/cmake/CMakeLists.txt | 4 +- indra/cmake/FindZLIB.cmake | 46 ----- indra/cmake/FindZLIBNG.cmake | 46 +++++ indra/cmake/LLCommon.cmake | 2 +- indra/cmake/LLPrimitive.cmake | 7 +- indra/cmake/ZLIB.cmake | 35 ---- indra/cmake/ZLIBNG.cmake | 35 ++++ indra/llcommon/CMakeLists.txt | 6 +- indra/llcommon/llsdserialize.cpp | 2 +- indra/llcommon/llsys.cpp | 2 +- indra/llcorehttp/CMakeLists.txt | 2 +- indra/llimage/CMakeLists.txt | 6 +- indra/llprimitive/llmodel.cpp | 2 +- indra/newview/CMakeLists.txt | 6 +- indra/newview/llviewerobjectlist.cpp | 2 +- 16 files changed, 234 insertions(+), 301 deletions(-) delete mode 100644 indra/cmake/FindZLIB.cmake create mode 100644 indra/cmake/FindZLIBNG.cmake delete mode 100644 indra/cmake/ZLIB.cmake create mode 100644 indra/cmake/ZLIBNG.cmake diff --git a/autobuild.xml b/autobuild.xml index 4768bd25c6..f97344c04b 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -166,9 +166,9 @@ archive hash - 3cc73623c9a976b4f8346a3837f7a916 + c2009b5914f5884b4a3c28e9ad3da549 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/64088/601256/boost-1.72-darwin64-545361.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/86984/801771/boost-1.72-darwin64-563356.tar.bz2 name darwin64 @@ -202,9 +202,9 @@ archive hash - 7d4b2511976449e9a4ec7be41dc8310f + f7dcd4eacc9a8a9dd00b796d8d3cda90 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/64092/601270/boost-1.72-windows-545361.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/86991/801772/boost-1.72-windows-563356.tar.bz2 name windows @@ -214,9 +214,9 @@ archive hash - 4ad8df0700745201cddf6b71d7b0949f + 2cd6b17ca13c5eeeca562c28a3af441c url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/64091/601265/boost-1.72-windows64-545361.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/86992/801784/boost-1.72-windows64-563356.tar.bz2 name windows64 @@ -308,9 +308,9 @@ archive hash - 02e6a8207dcdaf243dcb6da19b8c3534 + ba754816c391d93319f77964284bde2e url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/64099/601302/colladadom-2.3.545362-darwin64-545362.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/87587/804749/colladadom-2.3.563706-darwin64-563706.tar.bz2 name darwin64 @@ -344,9 +344,9 @@ archive hash - 8a02a10fc69c8f504dc5335644db184a + 649395b9e3d8b49f6879efc97f52bf49 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/64104/601313/colladadom-2.3.545362-windows-545362.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/87590/804763/colladadom-2.3.563706-windows-563706.tar.bz2 name windows @@ -356,16 +356,16 @@ archive hash - 742180324fca7ab92b6a61a36aab4f9d + 349f8c5f46a16425463ba15ad1013bf2 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/64103/601314/colladadom-2.3.545362-windows64-545362.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/87588/804757/colladadom-2.3.563706-windows64-563706.tar.bz2 name windows64 version - 2.3.545362 + 2.3.563706 curl @@ -398,9 +398,9 @@ archive hash - f5ae57117a6518d11f49ccfbfbe0969d + 85aa93094c46f5ba86eaf397ed11d1f1 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/64131/601402/curl-7.54.1.545369-darwin64-545369.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/87000/801824/curl-7.54.1.563360-darwin64-563360.tar.bz2 name darwin64 @@ -434,11 +434,11 @@ archive hash - 2796ae7b09e730a55ac03f74ed669520 + ae764cb3274f9e0381294f74d489d21f hash_algorithm md5 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/64130/601396/curl-7.54.1.545369-windows-545369.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/87001/801821/curl-7.54.1.563360-windows-563360.tar.bz2 name windows @@ -448,16 +448,16 @@ archive hash - a8f96e5cdb8128b23d49ff4c3f2233a4 + 377186f1859230a3588b6caea4286f26 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/64129/601382/curl-7.54.1.545369-windows64-545369.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/87002/801815/curl-7.54.1.563360-windows64-563360.tar.bz2 name windows64 version - 7.54.1.545369 + 7.54.1.563360 db @@ -880,9 +880,9 @@ archive hash - 81a2e9aca3e33c4eecf0081854540b07 + 5a284b9a5c19e6502b243e702e6666ee url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/56309/526711/freetype-2.4.4.539865-darwin64-539865.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/86990/801719/freetype-2.4.4.563358-darwin64-563358.tar.bz2 name darwin64 @@ -916,9 +916,9 @@ archive hash - 1d1c7b60f71a5152ced60bee87f5bba8 + 7309f26bf50a2a6581ba886680368a24 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/56312/526734/freetype-2.4.4.539865-windows-539865.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/86996/801804/freetype-2.4.4.563358-windows-563358.tar.bz2 name windows @@ -928,16 +928,16 @@ archive hash - 53e78d4a607e959637e98a82a3cf5bea + 4566d1fcf5d3c50475082f06187ea763 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/56310/526723/freetype-2.4.4.539865-windows64-539865.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/86997/801803/freetype-2.4.4.563358-windows64-563358.tar.bz2 name windows64 version - 2.4.4.539865 + 2.4.4.563358 glext @@ -1141,96 +1141,6 @@ version 1.0pre3.538980 - google_breakpad - - copyright - Copyright (c) 2006, Google Inc. - description - Breakpad is a crossplatform library for capturing crash callstacks and runtime data. - license - bsd - license_file - LICENSES/google_breakpad.txt - name - google_breakpad - platforms - - darwin - - archive - - hash - 171b39db6d0702535b41fad5b476e39d - url - http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/google-breakpad_3p-update-google-breakpad/rev/298033/arch/Darwin/installer/google_breakpad-1413.298033-darwin-298033.tar.bz2 - - name - darwin - - darwin64 - - archive - - hash - ca33f234aae399b9e704e262f7e15d35 - url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/56338/526869/google_breakpad-1413.539880-darwin64-539880.tar.bz2 - - name - darwin64 - - linux - - archive - - hash - 352e673897e8f36f8470150b8ace6ce9 - url - http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/p64_3p-google-breakpad/rev/314225/arch/Linux/installer/google_breakpad-1413.314225-linux-314225.tar.bz2 - - name - linux - - linux64 - - archive - - hash - 6bddcc1ac470dd5eab459220102df9e9 - url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/1835/4114/google_breakpad-1413.501824-linux64-501824.tar.bz2 - - name - linux64 - - windows - - archive - - hash - bfee0438617f57f02f7e8515a801cb20 - url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/56359/526982/google_breakpad-1413.539880-windows-539880.tar.bz2 - - name - windows - - windows64 - - archive - - hash - 6f983e754bb3046f065806b510b408c5 - url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/56358/526975/google_breakpad-1413.539880-windows64-539880.tar.bz2 - - name - windows64 - - - version - 1413.539880 - googlemock copyright @@ -1262,9 +1172,9 @@ archive hash - f9831360ced94943ab9dfb3fbf5256d3 + cf03c4eb26b4cc07a87def2ccc847fe4 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/64101/601290/googlemock-1.7.0.545363-darwin64-545363.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/87026/801906/googlemock-1.7.0.563371-darwin64-563371.tar.bz2 name darwin64 @@ -1298,9 +1208,9 @@ archive hash - 8149e46b4f7abb3ac284415cfe1366e1 + 6e22038018e933acab39b87ed7ec8154 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/64102/601296/googlemock-1.7.0.545363-windows-545363.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/87027/801912/googlemock-1.7.0.563371-windows-563371.tar.bz2 name windows @@ -1310,16 +1220,16 @@ archive hash - f3851eba809ead2810d702041569d36d + 3caed7eeb2161dfce81bb6754f27c709 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/64100/601284/googlemock-1.7.0.545363-windows64-545363.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/87028/801918/googlemock-1.7.0.563371-windows64-563371.tar.bz2 name windows64 version - 1.7.0.545363 + 1.7.0.563371 gstreamer @@ -1948,9 +1858,9 @@ archive hash - 0932b19bb6a8e2641706afd13d92951d + cc46a0f06659c60c1776dce789ffc8f0 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/56313/526740/libpng-1.6.8.539868-darwin64-539868.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/86989/801708/libpng-1.6.8.563357-darwin64-563357.tar.bz2 name darwin64 @@ -1984,9 +1894,9 @@ archive hash - f498782698428888113b64a7505c8f7f + 17e0fd54af900ecbccbfe298de696fee url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/56319/526770/libpng-1.6.8.539868-windows-539868.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/86994/801760/libpng-1.6.8.563357-windows-563357.tar.bz2 name windows @@ -1996,16 +1906,16 @@ archive hash - f8ac4f690a2925418866bccf6eba3cf4 + e1d6c3b01a7a948522f890d1f20cd05c url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/56317/526762/libpng-1.6.8.539868-windows64-539868.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/86993/801759/libpng-1.6.8.563357-windows64-563357.tar.bz2 name windows64 version - 1.6.8.539868 + 1.6.8.563357 libuuid @@ -2080,9 +1990,9 @@ archive hash - 0706b9c3889d767af9f5105d9ffa9b51 + 359cf1c7267c69db37aa894783a1d6ed url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/56327/526819/libxml2-2.9.4.539866-darwin64-539866.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/86995/801734/libxml2-2.9.4.563359-darwin64-563359.tar.bz2 name darwin64 @@ -2116,9 +2026,9 @@ archive hash - 1b7b979a8387fbb0f278dc681558b9ef + 37dbc89c4fb24da3751cfb99bd9f1bcc url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/56316/526755/libxml2-2.9.4.539866-windows-539866.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/86998/801792/libxml2-2.9.4.563359-windows-563359.tar.bz2 name windows @@ -2128,16 +2038,16 @@ archive hash - 4f8ff97d6a9ab350306b62eec8adc810 + 04ce00040a95960484bd484f31532cda url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/56314/526748/libxml2-2.9.4.539866-windows64-539866.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/86999/801791/libxml2-2.9.4.563359-windows64-563359.tar.bz2 name windows64 version - 2.9.4.539866 + 2.9.4.563359 llappearance_utility @@ -2394,6 +2304,62 @@ version 7.11.1.297294 + minizip-ng + + canonical_repo + https://bitbucket.org/lindenlab/3p-minizip-ng + copyright + This project uses the zlib license. Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler + description + minizip-ng is a zip manipulation library. Based on work of Gilles Vollant. + license + minizip + license_file + LICENSES/minizip-ng.txt + name + minizip-ng + platforms + + darwin64 + + archive + + hash + 6880623b17821b0e19ea277018a39e7f + url + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/87561/804600/minizip_ng-.563689-darwin64-563689.tar.bz2 + + name + darwin64 + + windows + + archive + + hash + bbc8a9dd05cdc9e8150084ea16de3ace + url + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/87560/804605/minizip_ng-.563689-windows-563689.tar.bz2 + + name + windows + + windows64 + + archive + + hash + 89af88d850467ee736c6e7ccaaeadb7e + url + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/87559/804602/minizip_ng-.563689-windows64-563689.tar.bz2 + + name + windows64 + + + version + .563689 + nghttp2 copyright @@ -2414,9 +2380,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 937ce1a2158c0cfff37f5989f5b24aba + e4f784d8a035c51921a1562ca7a1bab6 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/64066/601156/nghttp2-1.40.0.545354-darwin64-545354.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/76357/727350/nghttp2-1.40.0.555524-darwin64-555524.tar.bz2 name darwin64 @@ -2450,9 +2416,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 138b881bdf37dff4e626e022a50dd11f + af05aa2994c9845308fecd094b7b2d25 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/64069/601181/nghttp2-1.40.0.545354-windows-545354.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/76359/727360/nghttp2-1.40.0.555524-windows-555524.tar.bz2 name windows @@ -2462,9 +2428,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - c23c6480c7cbea60a2bd26e257adc0a7 + 5a55cede40eef16b9d1e47c418a2b77a url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/64068/601177/nghttp2-1.40.0.545354-windows64-545354.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/76358/727359/nghttp2-1.40.0.555524-windows64-555524.tar.bz2 name windows64 @@ -2473,7 +2439,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors source_type hg version - 1.40.0.545354 + 1.40.0.555524 nvapi @@ -2828,9 +2794,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 18aef0c8fc471b6539addbdc019aea25 + 5e589a1ec2695468ee0034e214fd97e2 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/56325/526804/openssl-1.0.2l.539874-darwin64-539874.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/86982/801701/openssl-1.1.1l.563354-darwin64-563354.tar.bz2 name darwin64 @@ -2864,9 +2830,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 2b2f61313b1cbd2893c1ba5bf15061fa + aac15f6f01a8283b001d04ce409a51eb url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/56328/526826/openssl-1.0.2l.539874-windows-539874.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/86987/801746/openssl-1.1.1l.563354-windows-563354.tar.bz2 name windows @@ -2876,16 +2842,16 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 59aae854155bc7119e0dca25e65828c0 + 6a0c5bb2a7e17d7b36e3f8f322af4e9f url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/56326/526811/openssl-1.0.2l.539874-windows64-539874.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/86988/801748/openssl-1.1.1l.563354-windows64-563354.tar.bz2 name windows64 version - 1.0.2l.539874 + 1.1.1l.563354 pcre @@ -3399,78 +3365,42 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors version 0.54.1.539072 - zlib + zlib-ng + canonical_repo + https://bitbucket.org/lindenlab/3p-zlib-ng copyright Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler description - Zlib Data Compression Library + zlib data compression library for the next generation systems license zlib license_file - LICENSES/zlib.txt + LICENSES/zlib-ng.txt name - zlib + zlib-ng platforms - darwin - - archive - - hash - 1a79eeac199c2d94e4ae4e5d0194e25f - url - http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/zlib_3p-update-zlib/rev/296881/arch/Darwin/installer/zlib-1.2.8.296881-darwin-296881.tar.bz2 - - name - darwin - darwin64 archive hash - 9785bda5b4d3b41bf391b33d0da78c9e + 978934d8ee9fa44cfcbf0fc6952733f9 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/54858/510190/zlib-1.2.8.538988-darwin64-538988.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/86979/801678/zlib_ng-2.0.5.563353-darwin64-563353.tar.bz2 name darwin64 - linux - - archive - - hash - 98a8c775c581ca80bb559e8b4e8eaae7 - hash_algorithm - md5 - url - http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/p64_3p-zlib/rev/314131/arch/Linux/installer/zlib-1.2.8.314131-linux-314131.tar.bz2 - - name - linux - - linux64 - - archive - - hash - dab6be8b0596c1e3354f2b6d41335131 - url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/866/1898/zlib-1.2.8.500857-linux64-500857.tar.bz2 - - name - linux64 - windows archive hash - ebdb07d4aaa5312005a8773f625032a4 + abbfde54d943fb999db9b98ee5850cb4 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/55048/512031/zlib-1.2.8.538988-windows-538988.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/86980/801690/zlib_ng-2.0.5.563353-windows-563353.tar.bz2 name windows @@ -3480,16 +3410,16 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 0ac95f3dece7d575ba45cf5728f53eea + b038b8dd39273494668f90cdbfa35332 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/55047/512024/zlib-1.2.8.538988-windows64-538988.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/86981/801689/zlib_ng-2.0.5.563353-windows64-563353.tar.bz2 name windows64 version - 1.2.8.538988 + 2.0.5.563353 package_description diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index cca305c741..225e9fc536 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -35,7 +35,7 @@ set(cmake_SOURCE_FILES FindSCP.cmake FindURIPARSER.cmake FindXmlRpcEpi.cmake - FindZLIB.cmake + FindZLIBNG.cmake FMODSTUDIO.cmake FreeType.cmake GLEXT.cmake @@ -92,7 +92,7 @@ set(cmake_SOURCE_FILES VisualLeakDetector.cmake LibVLCPlugin.cmake XmlRpcEpi.cmake - ZLIB.cmake + ZLIBNG.cmake ) source_group("Shared Rules" FILES ${cmake_SOURCE_FILES}) diff --git a/indra/cmake/FindZLIB.cmake b/indra/cmake/FindZLIB.cmake deleted file mode 100644 index 03a7db9d6f..0000000000 --- a/indra/cmake/FindZLIB.cmake +++ /dev/null @@ -1,46 +0,0 @@ -# -*- cmake -*- - -# - Find zlib -# Find the ZLIB includes and library -# This module defines -# ZLIB_INCLUDE_DIRS, where to find zlib.h, etc. -# ZLIB_LIBRARIES, the libraries needed to use zlib. -# ZLIB_FOUND, If false, do not try to use zlib. -# -# This FindZLIB is about 43 times as fast the one provided with cmake (2.8.x), -# because it doesn't look up the version of zlib, resulting in a dramatic -# speed up for configure (from 4 minutes 22 seconds to 6 seconds). -# -# Note: Since this file is only used for standalone, the windows -# specific parts were left out. - -FIND_PATH(ZLIB_INCLUDE_DIR zlib.h - NO_SYSTEM_ENVIRONMENT_PATH - ) - -FIND_LIBRARY(ZLIB_LIBRARY z) - -if (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR) - SET(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR}) - SET(ZLIB_LIBRARIES ${ZLIB_LIBRARY}) - SET(ZLIB_FOUND "YES") -else (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR) - SET(ZLIB_FOUND "NO") -endif (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR) - -if (ZLIB_FOUND) - if (NOT ZLIB_FIND_QUIETLY) - message(STATUS "Found ZLIB: ${ZLIB_LIBRARIES}") - SET(ZLIB_FIND_QUIETLY TRUE) - endif (NOT ZLIB_FIND_QUIETLY) -else (ZLIB_FOUND) - if (ZLIB_FIND_REQUIRED) - message(FATAL_ERROR "Could not find ZLIB library") - endif (ZLIB_FIND_REQUIRED) -endif (ZLIB_FOUND) - -mark_as_advanced( - ZLIB_LIBRARY - ZLIB_INCLUDE_DIR - ) - diff --git a/indra/cmake/FindZLIBNG.cmake b/indra/cmake/FindZLIBNG.cmake new file mode 100644 index 0000000000..6e3c8cdddb --- /dev/null +++ b/indra/cmake/FindZLIBNG.cmake @@ -0,0 +1,46 @@ +# -*- cmake -*- + +# - Find zlib-ng +# Find the ZLIB includes and library +# This module defines +# ZLIBNG_INCLUDE_DIRS, where to find zlib.h, etc. +# ZLIBNG_LIBRARIES, the libraries needed to use zlib. +# ZLIBNG_FOUND, If false, do not try to use zlib. +# +# This FindZLIBNG is about 43 times as fast the one provided with cmake (2.8.x), +# because it doesn't look up the version of zlib, resulting in a dramatic +# speed up for configure (from 4 minutes 22 seconds to 6 seconds). +# +# Note: Since this file is only used for standalone, the windows +# specific parts were left out. + +FIND_PATH(ZLIBNG_INCLUDE_DIR zlib.h + NO_SYSTEM_ENVIRONMENT_PATH + ) + +FIND_LIBRARY(ZLIBNG_LIBRARY z) + +if (ZLIBNG_LIBRARY AND ZLIBNG_INCLUDE_DIR) + SET(ZLIBNG_INCLUDE_DIRS ${ZLIBNG_INCLUDE_DIR}) + SET(ZLIBNG_LIBRARIES ${ZLIBNG_LIBRARY}) + SET(ZLIBNG_FOUND "YES") +else (ZLIBNG_LIBRARY AND ZLIBNG_INCLUDE_DIR) + SET(ZLIBNG_FOUND "NO") +endif (ZLINGB_LIBRARY AND ZLIBNG_INCLUDE_DIR) + +if (ZLIBNG_FOUND) + if (NOT ZLIBNG_FIND_QUIETLY) + message(STATUS "Found ZLIBNG: ${ZLIBNG_LIBRARIES}") + SET(ZLIBNG_FIND_QUIETLY TRUE) + endif (NOT ZLIBNG_FIND_QUIETLY) +else (ZLIBNG_FOUND) + if (ZLIBNG_FIND_REQUIRED) + message(FATAL_ERROR "Could not find ZLIBNG library") + endif (ZLIBNG_FIND_REQUIRED) +endif (ZLIBNG_FOUND) + +mark_as_advanced( + ZLIBNG_LIBRARY + ZLIBNG_INCLUDE_DIR + ) + diff --git a/indra/cmake/LLCommon.cmake b/indra/cmake/LLCommon.cmake index 8900419f9b..9c8740793a 100644 --- a/indra/cmake/LLCommon.cmake +++ b/indra/cmake/LLCommon.cmake @@ -3,7 +3,7 @@ include(APR) include(Boost) include(EXPAT) -include(ZLIB) +include(ZLIBNG) set(LLCOMMON_INCLUDE_DIRS ${LIBS_OPEN_DIR}/llcommon diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake index 93626f689f..91bba98840 100644 --- a/indra/cmake/LLPrimitive.cmake +++ b/indra/cmake/LLPrimitive.cmake @@ -5,6 +5,7 @@ include(Prebuilt) include(Boost) use_prebuilt_binary(colladadom) +use_prebuilt_binary(minizip-ng) # needed for colladadom use_prebuilt_binary(pcre) use_prebuilt_binary(libxml2) @@ -22,6 +23,8 @@ if (WINDOWS) optimized pcrecpp debug pcred optimized pcre + debug libminizip + optimized libminizip ${BOOST_SYSTEM_LIBRARIES} ) elseif (DARWIN) @@ -29,7 +32,7 @@ elseif (DARWIN) llprimitive debug collada14dom-d optimized collada14dom - minizip + libminizip # for collada xml2 pcrecpp pcre @@ -40,7 +43,7 @@ elseif (LINUX) llprimitive debug collada14dom-d optimized collada14dom - minizip + libminizip xml2 pcrecpp pcre diff --git a/indra/cmake/ZLIB.cmake b/indra/cmake/ZLIB.cmake deleted file mode 100644 index 6cff0753b2..0000000000 --- a/indra/cmake/ZLIB.cmake +++ /dev/null @@ -1,35 +0,0 @@ -# -*- cmake -*- - -set(ZLIB_FIND_QUIETLY ON) -set(ZLIB_FIND_REQUIRED ON) - -include(Prebuilt) - -if (USESYSTEMLIBS) - include(FindZLIB) -else (USESYSTEMLIBS) - use_prebuilt_binary(zlib) - if (WINDOWS) - set(ZLIB_LIBRARIES - debug zlibd - optimized zlib) - elseif (LINUX) - # - # When we have updated static libraries in competition with older - # shared libraries and we want the former to win, we need to do some - # extra work. The *_PRELOAD_ARCHIVES settings are invoked early - # and will pull in the entire archive to the binary giving it - # priority in symbol resolution. Beware of cmake moving the - # achive load itself to another place on the link command line. If - # that happens, you can try something like -Wl,-lz here to hide - # the archive. Also be aware that the linker will not tolerate a - # second whole-archive load of the archive. See viewer's - # CMakeLists.txt for more information. - # - set(ZLIB_PRELOAD_ARCHIVES -Wl,--whole-archive z -Wl,--no-whole-archive) - set(ZLIB_LIBRARIES z) - elseif (DARWIN) - set(ZLIB_LIBRARIES z) - endif (WINDOWS) - set(ZLIB_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/zlib) -endif (USESYSTEMLIBS) diff --git a/indra/cmake/ZLIBNG.cmake b/indra/cmake/ZLIBNG.cmake new file mode 100644 index 0000000000..1f46a23d92 --- /dev/null +++ b/indra/cmake/ZLIBNG.cmake @@ -0,0 +1,35 @@ +# -*- cmake -*- + +set(ZLIBNG_FIND_QUIETLY ON) +set(ZLIBNG_FIND_REQUIRED ON) + +include(Prebuilt) + +if (USESYSTEMLIBS) + include(FindZLIBNG) +else (USESYSTEMLIBS) + use_prebuilt_binary(zlib-ng) + if (WINDOWS) + set(ZLIBNG_LIBRARIES + debug zlib + optimized zlib) + elseif (LINUX) + # + # When we have updated static libraries in competition with older + # shared libraries and we want the former to win, we need to do some + # extra work. The *_PRELOAD_ARCHIVES settings are invoked early + # and will pull in the entire archive to the binary giving it + # priority in symbol resolution. Beware of cmake moving the + # achive load itself to another place on the link command line. If + # that happens, you can try something like -Wl,-lz here to hide + # the archive. Also be aware that the linker will not tolerate a + # second whole-archive load of the archive. See viewer's + # CMakeLists.txt for more information. + # + set(ZLIBNG_PRELOAD_ARCHIVES -Wl,--whole-archive z -Wl,--no-whole-archive) + set(ZLIBNG_LIBRARIES z) + elseif (DARWIN) + set(ZLIBNG_LIBRARIES z) + endif (WINDOWS) + set(ZLIBNG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/zlib-ng) +endif (USESYSTEMLIBS) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 22dfe12e40..040b0eb23d 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -10,14 +10,14 @@ include(Boost) include(LLSharedLibs) include(JsonCpp) include(Copy3rdPartyLibs) -include(ZLIB) +include(ZLIBNG) include(URIPARSER) include_directories( ${EXPAT_INCLUDE_DIRS} ${LLCOMMON_INCLUDE_DIRS} ${JSONCPP_INCLUDE_DIR} - ${ZLIB_INCLUDE_DIRS} + ${ZLIBNG_INCLUDE_DIRS} ${URIPARSER_INCLUDE_DIRS} ) @@ -290,7 +290,7 @@ target_link_libraries( ${APR_LIBRARIES} ${EXPAT_LIBRARIES} ${JSONCPP_LIBRARIES} - ${ZLIB_LIBRARIES} + ${ZLIBNG_LIBRARIES} ${WINDOWS_LIBRARIES} ${BOOST_FIBER_LIBRARY} ${BOOST_CONTEXT_LIBRARY} diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp index 022a5d4659..8b4a0ee6d8 100644 --- a/indra/llcommon/llsdserialize.cpp +++ b/indra/llcommon/llsdserialize.cpp @@ -37,7 +37,7 @@ #ifdef LL_USESYSTEMLIBS # include #else -# include "zlib/zlib.h" // for davep's dirty little zip functions +# include "zlib-ng/zlib.h" // for davep's dirty little zip functions #endif #if !LL_WINDOWS diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index b3a93e3254..f710f1b279 100644 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -36,7 +36,7 @@ #ifdef LL_USESYSTEMLIBS # include #else -# include "zlib/zlib.h" +# include "zlib-ng/zlib.h" #endif #include "llprocessor.h" diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt index 6a301ad50d..c591680250 100644 --- a/indra/llcorehttp/CMakeLists.txt +++ b/indra/llcorehttp/CMakeLists.txt @@ -7,7 +7,7 @@ include(GoogleMock) include(CURL) include(OpenSSL) include(NGHTTP2) -include(ZLIB) +include(ZLIBNG) include(LLCoreHttp) include(LLAddBuildTest) include(LLMessage) diff --git a/indra/llimage/CMakeLists.txt b/indra/llimage/CMakeLists.txt index 28b8e8c06d..45fb126b10 100644 --- a/indra/llimage/CMakeLists.txt +++ b/indra/llimage/CMakeLists.txt @@ -9,7 +9,7 @@ include(LLMath) include(LLVFS) include(LLKDU) include(LLImageJ2COJ) -include(ZLIB) +include(ZLIBNG) include(LLAddBuildTest) include(bugsplat) include(Tut) @@ -20,7 +20,7 @@ include_directories( ${LLMATH_INCLUDE_DIRS} ${LLVFS_INCLUDE_DIRS} ${PNG_INCLUDE_DIRS} - ${ZLIB_INCLUDE_DIRS} + ${ZLIBNG_INCLUDE_DIRS} ) set(llimage_SOURCE_FILES @@ -74,7 +74,7 @@ target_link_libraries(llimage ${LLCOMMON_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES} - ${ZLIB_LIBRARIES} + ${ZLIBNG_LIBRARIES} ) # Add tests diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index 702a1b5238..239b2aa878 100644 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -35,7 +35,7 @@ #ifdef LL_USESYSTEMLIBS # include #else -# include "zlib/zlib.h" +# include "zlib-ng/zlib.h" #endif std::string model_names[] = diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 03d2ea06f0..cc27232eae 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -52,7 +52,7 @@ include(UnixInstall) include(ViewerMiscLibs) include(ViewerManager) include(VisualLeakDetector) -include(ZLIB) +include(ZLIBNG) include(URIPARSER) if (NOT HAVOK_TPV) @@ -2007,14 +2007,14 @@ endif (WINDOWS) # # We generally want the newest version of the library to provide all symbol # resolution. To that end, when using static archives, the *_PRELOAD_ARCHIVES -# variables, PNG_PRELOAD_ARCHIVES and ZLIB_PRELOAD_ARCHIVES, get the archives +# variables, PNG_PRELOAD_ARCHIVES and ZLIBNG_PRELOAD_ARCHIVES, get the archives # dumped into the target binary and runtime lookup will find the most # modern version. target_link_libraries(${VIEWER_BINARY_NAME} ${LEGACY_STDIO_LIBS} ${PNG_PRELOAD_ARCHIVES} - ${ZLIB_PRELOAD_ARCHIVES} + ${ZLIBNG_PRELOAD_ARCHIVES} ${URIPARSER_PRELOAD_ARCHIVES} ${GOOGLE_PERFTOOLS_LIBRARIES} ${LLAUDIO_LIBRARIES} diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 63e48d1dd0..ea8b74d2c0 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -72,7 +72,7 @@ #ifdef LL_USESYSTEMLIBS #include #else -#include "zlib/zlib.h" +#include "zlib-ng/zlib.h" #endif #include "object_flags.h" -- cgit v1.2.3