mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Take advantage of IrrlichtMt CMake target (#11287)
With the CMake changes to IrrlichtMt, it's now possible to use a target for IrrlichtMt. Besides greatly improving the ease of setting up IrrlichtMt for users building the client, it removes the need for Minetest's CMake to include transitive dependencies such as image libraries, cleaning it up a tiny bit. The PR works by finding the IrrlichtMt package and linking to the target it provides. If the package isn't found and it isn't building the client, it will still fall back to using just the headers of old Irrlicht or IrrlichtMt.
This commit is contained in:
parent
216728cc5e
commit
cf136914cf
9 changed files with 62 additions and 140 deletions
|
@ -30,7 +30,7 @@ if [ -z "$toolchain_file" ]; then
|
|||
fi
|
||||
echo "Using $toolchain_file"
|
||||
|
||||
irrlicht_version=1.9.0mt1
|
||||
irrlicht_version=1.9.0mt2
|
||||
ogg_version=1.3.4
|
||||
vorbis_version=1.3.7
|
||||
curl_version=7.76.1
|
||||
|
@ -97,7 +97,7 @@ cd $builddir
|
|||
mkdir build
|
||||
cd build
|
||||
|
||||
irr_dlls=$(echo $libdir/irrlicht/bin/*.dll | tr ' ' ';')
|
||||
irr_dlls=$(echo $libdir/irrlicht/lib/*.dll | tr ' ' ';')
|
||||
vorbis_dlls=$(echo $libdir/libvorbis/bin/libvorbis{,file}-*.dll | tr ' ' ';')
|
||||
gettext_dlls=$(echo $libdir/gettext/bin/lib{intl,iconv}-*.dll | tr ' ' ';')
|
||||
|
||||
|
@ -113,9 +113,7 @@ cmake -S $sourcedir -B . \
|
|||
-DENABLE_FREETYPE=1 \
|
||||
-DENABLE_LEVELDB=1 \
|
||||
\
|
||||
-DIRRLICHT_INCLUDE_DIR=$libdir/irrlicht/include/irrlichtmt \
|
||||
-DIRRLICHT_LIBRARY=$libdir/irrlicht/lib/libIrrlichtMt.dll.a \
|
||||
-DIRRLICHT_DLL="$irr_dlls" \
|
||||
-DCMAKE_PREFIX_PATH=$libdir/irrlicht \
|
||||
\
|
||||
-DZLIB_INCLUDE_DIR=$libdir/zlib/include \
|
||||
-DZLIB_LIBRARIES=$libdir/zlib/lib/libz.dll.a \
|
||||
|
|
|
@ -30,7 +30,7 @@ if [ -z "$toolchain_file" ]; then
|
|||
fi
|
||||
echo "Using $toolchain_file"
|
||||
|
||||
irrlicht_version=1.9.0mt1
|
||||
irrlicht_version=1.9.0mt2
|
||||
ogg_version=1.3.4
|
||||
vorbis_version=1.3.7
|
||||
curl_version=7.76.1
|
||||
|
@ -97,7 +97,7 @@ cd $builddir
|
|||
mkdir build
|
||||
cd build
|
||||
|
||||
irr_dlls=$(echo $libdir/irrlicht/bin/*.dll | tr ' ' ';')
|
||||
irr_dlls=$(echo $libdir/irrlicht/lib/*.dll | tr ' ' ';')
|
||||
vorbis_dlls=$(echo $libdir/libvorbis/bin/libvorbis{,file}-*.dll | tr ' ' ';')
|
||||
gettext_dlls=$(echo $libdir/gettext/bin/lib{intl,iconv}-*.dll | tr ' ' ';')
|
||||
|
||||
|
@ -113,9 +113,7 @@ cmake -S $sourcedir -B . \
|
|||
-DENABLE_FREETYPE=1 \
|
||||
-DENABLE_LEVELDB=1 \
|
||||
\
|
||||
-DIRRLICHT_INCLUDE_DIR=$libdir/irrlicht/include/irrlichtmt \
|
||||
-DIRRLICHT_LIBRARY=$libdir/irrlicht/lib/libIrrlichtMt.dll.a \
|
||||
-DIRRLICHT_DLL="$irr_dlls" \
|
||||
-DCMAKE_PREFIX_PATH=$libdir/irrlicht \
|
||||
\
|
||||
-DZLIB_INCLUDE_DIR=$libdir/zlib/include \
|
||||
-DZLIB_LIBRARIES=$libdir/zlib/lib/libz.dll.a \
|
||||
|
|
|
@ -11,9 +11,7 @@ install_linux_deps() {
|
|||
shift
|
||||
pkgs+=(libirrlicht-dev)
|
||||
else
|
||||
# TODO: return old URL when IrrlichtMt 1.9.0mt2 is tagged
|
||||
#wget "https://github.com/minetest/irrlicht/releases/download/1.9.0mt1/ubuntu-bionic.tar.gz"
|
||||
wget "http://minetest.kitsunemimi.pw/irrlichtmt-patched-temporary.tgz" -O ubuntu-bionic.tar.gz
|
||||
wget "https://github.com/minetest/irrlicht/releases/download/1.9.0mt2/ubuntu-bionic.tar.gz"
|
||||
sudo tar -xaf ubuntu-bionic.tar.gz -C /usr/local
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue