Merge branch 'xgalaxy-master'
This commit is contained in:
commit
3108fdcbd0
33
install.sh
33
install.sh
@ -21,11 +21,42 @@ function homebrew_cmake_install {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function python_finder {
|
||||||
|
python_library="-DPYTHON_LIBRARY="
|
||||||
|
python_include="-DPYTHON_INCLUDE_DIR="
|
||||||
|
|
||||||
|
# The CMake 'FindPythonLibs' Module does not work properly.
|
||||||
|
# So we are forced to do its job for it.
|
||||||
|
python_prefix=$(python-config --prefix | sed 's/^[ \t]*//')
|
||||||
|
if [ -f "${python_prefix}/Python" ]; then
|
||||||
|
python_library+="${python_prefix}/Python"
|
||||||
|
python_include+="${python_prefix}/Headers"
|
||||||
|
else
|
||||||
|
which_python=$(python -c 'import sys;print(sys.version)' | sed 's/^[ \t]*//')
|
||||||
|
which_python="python${which_python:0:3}"
|
||||||
|
lib_python="${python_prefix}/lib/lib${which_python}"
|
||||||
|
if [ -f "${lib_python}.a" ]; then
|
||||||
|
python_library+="${lib_python}.a"
|
||||||
|
else
|
||||||
|
python_library+="${lib_python}.dylib"
|
||||||
|
fi
|
||||||
|
python_include+="${python_prefix}/include/${which_python}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "${python_library} ${python_include}"
|
||||||
|
}
|
||||||
|
|
||||||
function install {
|
function install {
|
||||||
ycm_dir=`pwd`
|
ycm_dir=`pwd`
|
||||||
build_dir=`mktemp -d -t ycm_build.XXXX`
|
build_dir=`mktemp -d -t ycm_build.XXXX`
|
||||||
pushd $build_dir
|
pushd $build_dir
|
||||||
cmake -G "Unix Makefiles" $1 . $ycm_dir/cpp
|
|
||||||
|
if [[ `uname -s` == "Darwin" ]]; then
|
||||||
|
cmake -G "Unix Makefiles" $(python_finder) $1 . $ycm_dir/cpp
|
||||||
|
else
|
||||||
|
cmake -G "Unix Makefiles" $1 . $ycm_dir/cpp
|
||||||
|
fi
|
||||||
|
|
||||||
make ycm_core
|
make ycm_core
|
||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user