diff options
author | Treeve Jelbert | 2016-01-01 16:43:29 +0100 |
---|---|---|
committer | Treeve Jelbert | 2016-01-01 18:46:10 +0100 |
commit | d25ef97fb2ba836f0936f300f8473c206e11cadc (patch) | |
tree | 66acad7054811a3042c29bc54dbffc70697e1683 /FUNCTIONS | |
parent | cd4c028513c499a4c689f87808b0ab24fe901c57 (diff) |
support ninja-build-system in cmake build;
this is enabled for all kde and qt5-cmake spells
to use it, source CMAKE_CONFIGURE in CONFIGURE and use cmake-{build,install}
Diffstat (limited to 'FUNCTIONS')
-rwxr-xr-x | FUNCTIONS | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -543,6 +543,12 @@ cmake_build() { mkdir -p build && cd build && prepare_cmake_flags && + if [[ $CMAKE_GEN == Ninja ]];then + MAKE=ninja + OPTS+=" -G Ninja" + else + MAKE=make + fi && if [[ -z $1 ]];then CMAKE_INSTALL_PREFIX="$INSTALL_ROOT/usr" @@ -561,7 +567,15 @@ cmake_build() { -DCMAKE_C_FLAGS_RELEASE="$CFLAGS" \ -DCMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \ $OPTS ../ && - make + $MAKE +} + +function cmake_install() { + if [[ $CMAKE_GEN == Ninja ]];then + ninja install + else + make install + fi } qt4_cmake_build() { |