1
0
Fork 0
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:
JosiahWI 2021-07-27 12:11:27 -05:00 committed by GitHub
parent 216728cc5e
commit cf136914cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 62 additions and 140 deletions

View file

@ -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 \