Skip to content

Commit

Permalink
Build: fix wxWidgets Linux build to work without prefix
Browse files Browse the repository at this point in the history
Didn't work with an empty prefix. Also fixes behavior when --clean is specified since we use a special build directory.
  • Loading branch information
ChristianBeer committed Mar 20, 2017
1 parent abd19d2 commit a59f6bd
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions 3rdParty/buildWxLinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ fi

doclean=""
configuration="Release"
lprefix=""
cmdline_prefix=""
while [[ $# -gt 0 ]]; do
key="$1"
case $key in
Expand All @@ -73,6 +75,7 @@ while [[ $# -gt 0 ]]; do
;;
-prefix|--prefix)
lprefix="$2"
cmdline_prefix="--prefix=${lprefix}"
shift
;;
esac
Expand All @@ -84,20 +87,20 @@ if [ $configuration = "Debug" ]; then
debug_flag="--enable-debug"
fi

if [ "${doclean}" = "yes" ]; then
make clean
if [ -d buildgtk ] && [ "${doclean}" = "yes" ]; then
rm -rf buildgtk
fi

mkdir buildgtk
if [ $? -ne 0 ]; then exit 1; fi
mkdir -p buildgtk
cd buildgtk || return 1

../configure --prefix="${lprefix}" --with-gtk --disable-shared --enable-webview --disable-gtktest --disable-sdltest ${debug_flag}
../configure "${cmdline_prefix}" --with-gtk --disable-shared --enable-webview --disable-gtktest --disable-sdltest ${debug_flag}
if [ $? -ne 0 ]; then cd ..; return 1; fi
make 1>/dev/null # the wxWidgets build is very noisy so tune it down to warnings and errors only
if [ $? -ne 0 ]; then cd ..; return 1; fi
make install
if [ $? -ne 0 ]; then cd ..; return 1; fi
if [ "x${lprefix}" != "x" ]; then
make install
if [ $? -ne 0 ]; then cd ..; return 1; fi
fi

cd ..
return 0

0 comments on commit a59f6bd

Please sign in to comment.