|
@ -1,17 +1,19 @@ |
|
|
compile_cmake() { |
|
|
compile_cmake() { |
|
|
local olddir="$PWD" |
|
|
local olddir="$PWD" |
|
|
|
|
|
local builddir='build' |
|
|
local noinstall=false |
|
|
local noinstall=false |
|
|
|
|
|
|
|
|
local OPTIND=1 |
|
|
local OPTIND=1 |
|
|
local opt |
|
|
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 ;; |
|
|
I) local noinstall=true ;; |
|
|
esac; done |
|
|
esac; done |
|
|
shift $((OPTIND-1)) |
|
|
shift $((OPTIND-1)) |
|
|
[ "$1" = '--' ] && shift |
|
|
[ "$1" = '--' ] && shift |
|
|
|
|
|
|
|
|
mkdir -p build; cd build |
|
|
mkdir -p "$builddir"; cd "$builddir" |
|
|
cmake .. \ |
|
|
cmake "$olddir" \ |
|
|
-DCMAKE_BUILD_TYPE=Release \ |
|
|
-DCMAKE_BUILD_TYPE=Release \ |
|
|
-DCMAKE_INSTALL_PREFIX="/$dir_prefix" \ |
|
|
-DCMAKE_INSTALL_PREFIX="/$dir_prefix" \ |
|
|
-DCMAKE_INSTALL_SYSCONFDIR="$dir_sysconfdir" \ |
|
|
-DCMAKE_INSTALL_SYSCONFDIR="$dir_sysconfdir" \ |
|
|