build the SDL on linux
This commit is contained in:
16
build.sh
16
build.sh
@@ -7,6 +7,22 @@ if [ -v release ]; then echo "[release build]"; fi
|
|||||||
if [ -v slow ]; then echo "[slow build]"; fi
|
if [ -v slow ]; then echo "[slow build]"; fi
|
||||||
|
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
|
|
||||||
|
if [ ! -e "src/external/SDL" ]; then
|
||||||
|
cd src/external
|
||||||
|
git clone https://github.com/libsdl-org/SDL.git
|
||||||
|
cd SDL
|
||||||
|
git checkout release-3.4.0
|
||||||
|
cmake -S . -B build_linux -DCMAKE_BUILD_TYPE=Release -DSDL_PIPEWIRE=OFF
|
||||||
|
# cmake -S . -B build_linux -DSDL_PIPEWIRE=OFF -DCMAKE_BUILD_TYPE=Debug
|
||||||
|
cd build_linux
|
||||||
|
make -j16
|
||||||
|
LIB=$(readlink -f libSDL3.so)
|
||||||
|
cp $LIB ../../../../build/libSDL3.so
|
||||||
|
cp *.a ../../../../build/.
|
||||||
|
cd ../../../../
|
||||||
|
fi
|
||||||
|
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
I="-I../src/external/SDL/include -I../src/external/lua/src -I../src/external/glad -I../src"
|
I="-I../src/external/SDL/include -I../src/external/lua/src -I../src/external/glad -I../src"
|
||||||
|
|||||||
Reference in New Issue
Block a user