From 0ee34bf81055036caa91a8e8f3ba352b75b96eaa Mon Sep 17 00:00:00 2001 From: Timerix22 Date: Fri, 22 Mar 2024 17:02:30 +0500 Subject: [PATCH] pre_build.sh fix --- src/main.cpp | 2 +- tasks/pre_build.sh | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 6368b08..962606c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,7 +1,7 @@ #include "gui/gui.hpp" #include -// SDL for some reason redefains main +// SDL for some reason redefines main #ifdef main #undef main #endif diff --git a/tasks/pre_build.sh b/tasks/pre_build.sh index e200432..6e86b2f 100644 --- a/tasks/pre_build.sh +++ b/tasks/pre_build.sh @@ -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