From 026156e1f5a1f40fdb6edc4901cb597451cf8b90 Mon Sep 17 00:00:00 2001 From: Noah Swerhun Date: Sat, 26 Feb 2022 19:31:40 -0600 Subject: [PATCH] fixed empty string for pkg-config --- cbuild.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cbuild.sh b/cbuild.sh index 620e486..3e229bc 100755 --- a/cbuild.sh +++ b/cbuild.sh @@ -28,8 +28,10 @@ OBJ="$(find ${SRCDIR} -name '*\.c' 2> /dev/null | srcnum="$(find ${SRCDIR} -name '*\.c' -exec printf %c {} + 2> /dev/null | wc -c)" -CFLAGS="${CFLAGS} $(pkg-config --cflags "${PKG_CONFIG_LIBS}")" -LDLIBS="${CFLAGS} $(pkg-config --libs "${PKG_CONFIG_LIBS}")" +if [ -n "${PKG_CONFIG_LIBS}" ]; then + CFLAGS="${CFLAGS} $(pkg-config --cflags "${PKG_CONFIG_LIBS}")" + LDLIBS="${CFLAGS} $(pkg-config --libs "${PKG_CONFIG_LIBS}")" +fi clear_formatting="\033[0m" bold="\033[1m"