Mercurial > repos > blastem
diff build_release @ 2573:639561060a28
Do a little work towards eventual support for building against SDL3
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 02 Feb 2025 19:12:50 -0800 |
parents | 2d32c1232fff |
children | c9bfed9156dc |
line wrap: on
line diff
--- a/build_release Sun Feb 02 18:06:50 2025 -0800 +++ b/build_release Sun Feb 02 19:12:50 2025 -0800 @@ -5,20 +5,30 @@ if [ -z "$OS" ]; then OS=`uname -s` fi - +SDL="sdl2" if [ $OS = "Linux" ]; then - cd sdl - ./configure - make all - cd .. rm -rf lib mkdir lib - cp sdl/build/.libs/libSDL2-*.so.*.*.* lib - sdl=`ls lib` - link=`echo $sdl | sed -E 's/(so\.[0-9]*).*/\1/'` - cd lib - ln -s "$sdl" "$link" - ln -s "$sdl" libSDL2.so + cd sdl + if [ -f ./configure ]; then + ./configure + make all + cp build/.libs/libSDL2-*.so.*.*.* ../lib + cd .. + sdl=`ls lib` + link=`echo $sdl | sed -E 's/(so\.[0-9]*).*/\1/'` + cd lib + ln -s "$sdl" "$link" + ln -s "$sdl" libSDL2.so + elif [ -f ./CMakeLists.txt ]; then + cmake -S . -B build + cmake --build build + cp build/libSDL3.so* ../lib + SDL="sdl3" + else + echo "Failed to find SDL build file!"; + exit 1 + fi cd .. cd glew make all @@ -26,10 +36,10 @@ fi echo "Path is: $PATH" if [ $OS = "Win64" ]; then - make PORTABLE=1 OS=Windows CPU=x86_64 clean all + make PORTABLE=1 OS=Windows CPU=x86_64 SDL=$SDL clean all SDLDLLPATH=sdl/x86_64-w64-mingw32/bin else - make PORTABLE=1 clean all + make PORTABLE=1 SDL=$SDL clean all SDLDLLPATH=sdl/i686-w64-mingw32/bin fi make menu.bin tmss.md