pre_build.sh fix

This commit is contained in:
Timerix22 2024-03-22 17:02:30 +05:00
parent e47f497f8c
commit 0ee34bf810
2 changed files with 7 additions and 5 deletions

View File

@ -1,7 +1,7 @@
#include "gui/gui.hpp"
#include <iostream>
// SDL for some reason redefains main
// SDL for some reason redefines main
#ifdef main
#undef main
#endif

View File

@ -9,12 +9,14 @@ fi
set -x
# copy precompiled static libs to objects
cp libs/*.a "$OBJDIR/libs/"
static_libs=$(find "libs/" -name '*.a')
[[ -n "$static_libs" ]] && cp $static_libs "$OBJDIR/libs/"
# copy precompiled shared libs to outdir
if [ $OS == 'WINDOWS' ]; then
cp libs/*.dll "$OUTDIR"
if [ "$OS" == 'WINDOWS' ]; then
dynamic_libs=$(find "libs/" -name '*.dll')
else
cp libs/*.so "$OUTDIR"
dynamic_libs=$(find "libs/" -name '*.so')
fi
[[ -n "$dynamic_libs" ]] && cp $dynamic_libs "$OUTDIR/"
set +x