summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xCMAKE_CONFIGURE2
-rw-r--r--ChangeLog3
-rwxr-xr-xFUNCTIONS16
-rwxr-xr-xKDE4_FUNCTIONS6
-rwxr-xr-xKDE5_DEPENDS3
-rwxr-xr-xKDE5_FUNCTIONS6
-rwxr-xr-xqt5-cmake/FUNCTIONS6
7 files changed, 35 insertions, 7 deletions
diff --git a/CMAKE_CONFIGURE b/CMAKE_CONFIGURE
index 73089ce7af..5bc94a1523 100755
--- a/CMAKE_CONFIGURE
+++ b/CMAKE_CONFIGURE
@@ -2,3 +2,5 @@ config_query_list CM_BUILD_TYPE 'which build type?' Release Debug RelWithDebIn
#if is_depends_enabled $SPELL extra-cmake-modules;then
config_query_option CM_TESTS 'build tests?' n "-DBUILD_TESTING=1" "-DBUILD_TESTING=0"
#fi
+CMAKE_GEN=${CMAKE_GEN:-Ninja}
+persistent_add CMAKE_GEN
diff --git a/ChangeLog b/ChangeLog
index 44886829d0..5bc1611b07 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2016-01-01 Treeve Jelbert <treeve@sourcemage.org>
+ * KDE*, CMAKE* FUNCTIONS: add cmake_install, to support ninja
+
2015-12-28 Thomas Orgis <sobukus@sourcemage.org>
* perl-cpan/perl-extutils-xspp: ExtUtils::XSpp - XS for C++
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() {
diff --git a/KDE4_FUNCTIONS b/KDE4_FUNCTIONS
index 8df8f8ca77..0123407202 100755
--- a/KDE4_FUNCTIONS
+++ b/KDE4_FUNCTIONS
@@ -6,9 +6,9 @@ default_build() {
kde4_build
}
-#function default_install() {
-# cmake_install
-#}
+function default_install() {
+ cmake_install
+}
#---------------------------------------------------------------------
function kde4_build() {
diff --git a/KDE5_DEPENDS b/KDE5_DEPENDS
index e3f854c349..0576fcc7c3 100755
--- a/KDE5_DEPENDS
+++ b/KDE5_DEPENDS
@@ -1,4 +1,7 @@
depends -sub CXX gcc &&
depends cmake &&
depends extra-cmake-modules &&
+if [[ $CMAKE_GEN == Ninja ]];then
+ depends ninja-build-system
+fi &&
depends qtbase
diff --git a/KDE5_FUNCTIONS b/KDE5_FUNCTIONS
index 2e6189abb9..ba2a763b99 100755
--- a/KDE5_FUNCTIONS
+++ b/KDE5_FUNCTIONS
@@ -15,9 +15,9 @@ default_build() {
kde5_build
}
-#function default_install() {
-# cmake_install
-#}
+function default_install() {
+ cmake_install
+}
# we need a default_final, default_post_remove
diff --git a/qt5-cmake/FUNCTIONS b/qt5-cmake/FUNCTIONS
index bb2ac3ef01..5458614d03 100755
--- a/qt5-cmake/FUNCTIONS
+++ b/qt5-cmake/FUNCTIONS
@@ -2,3 +2,9 @@
default_build() {
qt5_cmake_build
}
+
+function default_install() {
+ cmake_install
+}
+
+