aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2023-07-09 18:24:23 -0400
committerAdam Harrison <adamdharrison@gmail.com>2023-07-09 18:24:23 -0400
commit8023dc0d878a0410778b6b02a4ad0bf3edfe9fc1 (patch)
tree7917295dd58441c5077809f90d6d55f816326aec
parent4a726485413dc4aea513ef1bd2cbd12a23e16bcc (diff)
downloadlite-xl-plugin-manager-8023dc0d878a0410778b6b02a4ad0bf3edfe9fc1.tar.gz
lite-xl-plugin-manager-8023dc0d878a0410778b6b02a4ad0bf3edfe9fc1.zip
Made -g flag signal whether or not we move to debug builds for cmake.
-rwxr-xr-xbuild.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/build.sh b/build.sh
index a01ffd1..fb1011f 100755
--- a/build.sh
+++ b/build.sh
@@ -14,7 +14,8 @@ LDFLAGS="$LDFLAGS -lm -Llib/prefix/lib"
cmake --version >/dev/null 2>/dev/null || { echo "Please ensure that you have cmake installed." && exit -1; }
# Build supporting libraries, libz, libmbedtls, libmbedcrypto, libgit2, libzip, libmicrotar, liblua
-CMAKE_DEFAULT_FLAGS=" $CMAKE_DEFAULT_FLAGS -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=`pwd`/lib/prefix -DCMAKE_INSTALL_PREFIX=`pwd`/lib/prefix -DBUILD_SHARED_LIBS=OFF"
+[[ " $@" != *" -g"* ]] && CMAKE_DEFAULT_FLAGS="$CMAKE_DEFUALT_FLAGS -DCMAKE_BUILD_TYPE=Release" || CMAKE_DEFUALT_FLAGS="$CMAKE_DEFUALT_FLAGS -DCMAKE_BUILD_TYPE=Debug"
+CMAKE_DEFAULT_FLAGS=" $CMAKE_DEFAULT_FLAGS -DCMAKE_PREFIX_PATH=`pwd`/lib/prefix -DCMAKE_INSTALL_PREFIX=`pwd`/lib/prefix -DBUILD_SHARED_LIBS=OFF"
mkdir -p lib/prefix/include lib/prefix/lib
if [[ "$@" != *"-lz"* ]]; then
[ ! -e "lib/zlib" ] && echo "Make sure you've cloned submodules. (git submodule update --init --depth=1)" && exit -1