1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-22 17:18:39 +00:00

Use CMake's -B, --build, and --install options

This commit is contained in:
ShadowNinja 2022-01-31 19:42:24 -05:00 committed by rubenwardy
parent f5e54cd398
commit 24a0f55c9c
6 changed files with 22 additions and 33 deletions

View file

@ -113,14 +113,12 @@ git_hash=$(cd $sourcedir && git rev-parse --short HEAD)
# Build the thing
cd $builddir
[ -d build ] && rm -rf build
mkdir build
cd build
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 ' ' ';')
cmake -S $sourcedir -B . \
cmake -S $sourcedir -B build \
-DCMAKE_TOOLCHAIN_FILE=$toolchain_file \
-DCMAKE_INSTALL_PREFIX=/tmp \
-DVERSION_EXTRA=$git_hash \
@ -181,9 +179,9 @@ cmake -S $sourcedir -B . \
-DLEVELDB_LIBRARY=$libdir/leveldb/lib/libleveldb.dll.a \
-DLEVELDB_DLL=$libdir/leveldb/bin/libleveldb.dll
make -j$(nproc)
cmake --build build -j$(nproc)
[ -z "$NO_PACKAGE" ] && make package
[ -z "$NO_PACKAGE" ] && cmake --build build --target package
exit 0
# EOF