]> git.rm.cloudns.org Git - xonotic/xonotic.wiki.git/commitdiff
Adding libogg instructions
authorz411 <electrik.persona@gmail.com>
Mon, 13 Dec 2021 19:59:54 +0000 (19:59 +0000)
committerz411 <electrik.persona@gmail.com>
Mon, 13 Dec 2021 19:59:54 +0000 (19:59 +0000)
Shared-libraries-(buildfiles).md

index 4b9a4637cb3298fe6747f0302742d62b9c4ade3f..746be32ce8581658b0916b8ba4a2d86286d8aafd 100644 (file)
@@ -183,6 +183,23 @@ Obtainment instructions:
 * download MSYS2 Package [1] in x86 and x64 versions: https://packages.msys2.org/base/mingw-w64-libogg
 * use dll from `bin` folder
 
+Cross-compiling:
+
+```
+OGGVER="v1.3.5"
+git clone -b $OGGVER https://gitlab.xiph.org/xiph/ogg.git
+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
+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/ogg"
+make
+make install
+cd "$d0"
+cp out/bin/libogg.dll ~/Games/xonotic/misc/buildfiles/win64/libogg.dll
+```
+
 ### macOS
 Darkplaces loads `libogg.dylib`