Browse Source

Allow custom builddir with compile_cmake

master
mid-kid 8 years ago
parent
commit
005eefd46f
  1. 8
      satellites/functions/compile/cmake.sh

8
satellites/functions/compile/cmake.sh

@ -1,17 +1,19 @@
compile_cmake() {
local olddir="$PWD"
local builddir='build'
local noinstall=false
local OPTIND=1
local opt
while getopts 'I' opt; do case "$opt" in
while getopts 'b:I' opt; do case "$opt" in
b) local builddir="$OPTARG" ;;
I) local noinstall=true ;;
esac; done
shift $((OPTIND-1))
[ "$1" = '--' ] && shift
mkdir -p build; cd build
cmake .. \
mkdir -p "$builddir"; cd "$builddir"
cmake "$olddir" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="/$dir_prefix" \
-DCMAKE_INSTALL_SYSCONFDIR="$dir_sysconfdir" \

Loading…
Cancel
Save