From: z411 Date: Tue, 14 Dec 2021 19:26:38 +0000 (+0000) Subject: Update correct zlib building X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c195ef729f2e70c496537a75015d4ebccae99463;p=xonotic%2Fxonotic.wiki.git Update correct zlib building --- diff --git a/Shared-libraries-(buildfiles).md b/Shared-libraries-(buildfiles).md index 17f94fe..de1a826 100644 --- a/Shared-libraries-(buildfiles).md +++ b/Shared-libraries-(buildfiles).md @@ -69,17 +69,18 @@ ZLIBVER="1.2.11" curl -L -o zlib-$ZLIBVER.tar.xz https://zlib.net/zlib-$ZLIBVER.tar.xz || true tar -xf zlib-$ZLIBVER.tar.xz rm zlib-$ZLIBVER.tar.xz - curl -o x86_64-w64-mingw32.cmake https://raw.githubusercontent.com/zyga/cmake-toolchains/master/Toolchain-Ubuntu-mingw64.cmake + d0=$(pwd) rm -rf build mkdir build cd build +sed -i '/zlib PROPERTIES SUFFIX/i set_target_properties(zlib PROPERTIES PREFIX "")' "$d0/zlib-$ZLIBVER/CMakeLists.txt" # Remove the "lib" prefix. TODO Do this through the cmake cache? cmake -DCMAKE_TOOLCHAIN_FILE="$d0/x86_64-w64-mingw32.cmake" -DBUILD_SHARED_LIBS=true -DCMAKE_SYSTEM_PROCESSOR=x86_64 -DCMAKE_INSTALL_PREFIX="$d0/out" -G"Unix Makefiles" "$d0/zlib-$ZLIBVER" make make install cd "$d0" -cp out/bin/libzlib1.dll ~/Games/xonotic/misc/buildfiles/win64/zlib1.dll +cp out/bin/zlib1.dll ~/Games/xonotic/misc/buildfiles/win64/zlib1.dll ``` ### macOS