diff options
-rwxr-xr-x | CMAKE_CONFIGURE | 2 | ||||
-rw-r--r-- | ChangeLog | 3 | ||||
-rwxr-xr-x | FUNCTIONS | 16 | ||||
-rwxr-xr-x | KDE4_FUNCTIONS | 6 | ||||
-rwxr-xr-x | KDE5_DEPENDS | 3 | ||||
-rwxr-xr-x | KDE5_FUNCTIONS | 6 | ||||
-rwxr-xr-x | qt5-cmake/FUNCTIONS | 6 |
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 @@ -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++ @@ -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 +} + + |