Commit 3f7fdeef authored by Neverlord's avatar Neverlord

fixed config script for user-defined build dir

parent 7d07ea2f
......@@ -91,23 +91,31 @@ configure ()
append_cache_entry CMAKE_CXX_COMPILER FILEPATH $1
fi
if [[ "$builddir" = /* ]]; then
# absolute path given
absolute_builddir="$builddir"
else
# relative path given; convert to absolute path
absolute_builddir="$(pwd)/$builddir"
fi
if [ -n "$2" ]; then
workdir="$builddir-$2"
workdir="$absolute_builddir-$2"
else
workdir="$builddir"
workdir="$absolute_builddir"
fi
workdirs="$workdirs $workdir"
if [ -n "$3" ]; then
append_cache_entry EXECUTABLE_OUTPUT_PATH PATH "$3"
else
append_cache_entry EXECUTABLE_OUTPUT_PATH PATH "$workdir/bin"
append_cache_entry EXECUTABLE_OUTPUT_PATH PATH "$absolute_builddir/bin"
fi
if [ -n "$4" ]; then
append_cache_entry LIBRARY_OUTPUT_PATH PATH "$4"
else
append_cache_entry LIBRARY_OUTPUT_PATH PATH "$workdir/lib"
append_cache_entry LIBRARY_OUTPUT_PATH PATH "$absolute_builddir/lib"
fi
if [ -d $workdir ]; then
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment