]> git.rm.cloudns.org Git - xonotic/xonotic.wiki.git/commitdiff
Update correct zlib building
authorz411 <electrik.persona@gmail.com>
Tue, 14 Dec 2021 19:26:38 +0000 (19:26 +0000)
committerz411 <electrik.persona@gmail.com>
Tue, 14 Dec 2021 19:26:38 +0000 (19:26 +0000)
Shared-libraries-(buildfiles).md

index 17f94fe40e434344645afd36f7d10d9b75fc4f64..de1a82695f86c80b0741da15b68b8d11390ea226 100644 (file)
@@ -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