summaryrefslogtreecommitdiffstats
path: root/FUNCTIONS
diff options
context:
space:
mode:
authorTreeve Jelbert2016-01-01 16:43:29 +0100
committerTreeve Jelbert2016-01-01 18:46:10 +0100
commitd25ef97fb2ba836f0936f300f8473c206e11cadc (patch)
tree66acad7054811a3042c29bc54dbffc70697e1683 /FUNCTIONS
parentcd4c028513c499a4c689f87808b0ab24fe901c57 (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-xFUNCTIONS16
1 files changed, 15 insertions, 1 deletions
diff --git a/FUNCTIONS b/FUNCTIONS
index 5bd70bb1e4..acb43eb2c4 100755
--- a/FUNCTIONS
+++ b/FUNCTIONS
@@ -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() {