cmake: add withQt5 option and make it the default
This commit is contained in:
parent
f3ac052f24
commit
b49b9da3ce
|
@ -6,8 +6,12 @@
|
|||
, useSharedLibraries ? (!isBootstrap && !stdenv.isCygwin)
|
||||
, useNcurses ? false, ncurses
|
||||
, useQt4 ? false, qt4
|
||||
, withQt5 ? false, qtbase
|
||||
}:
|
||||
|
||||
assert withQt5 -> useQt4 == false;
|
||||
assert useQt4 -> withQt5 == false;
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
let
|
||||
|
@ -18,7 +22,7 @@ let
|
|||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "cmake-${os isBootstrap "boot-"}${os useNcurses "cursesUI-"}${os useQt4 "qt4UI-"}${version}";
|
||||
name = "cmake-${os isBootstrap "boot-"}${os useNcurses "cursesUI-"}${os withQt5 "qt5UI-"}${os useQt4 "qt4UI-"}${version}";
|
||||
|
||||
inherit majorVersion;
|
||||
|
||||
|
@ -46,7 +50,8 @@ stdenv.mkDerivation rec {
|
|||
[ setupHook pkgconfig ]
|
||||
++ optionals useSharedLibraries [ bzip2 curl expat libarchive xz zlib libuv rhash ]
|
||||
++ optional useNcurses ncurses
|
||||
++ optional useQt4 qt4;
|
||||
++ optional useQt4 qt4
|
||||
++ optional withQt5 qtbase;
|
||||
|
||||
propagatedBuildInputs = optional stdenv.isDarwin ps;
|
||||
|
||||
|
@ -63,7 +68,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
configureFlags = [ "--docdir=share/doc/${name}" ]
|
||||
++ (if useSharedLibraries then [ "--no-system-jsoncpp" "--system-libs" ] else [ "--no-system-libs" ]) # FIXME: cleanup
|
||||
++ optional useQt4 "--qt-gui"
|
||||
++ optional (useQt4 || withQt5) "--qt-gui"
|
||||
++ optionals (!useNcurses) [ "--" "-DBUILD_CursesDialog=OFF" ];
|
||||
|
||||
dontUseCmakeConfigure = true;
|
||||
|
|
|
@ -6882,13 +6882,14 @@ with pkgs;
|
|||
inherit (darwin) ps;
|
||||
};
|
||||
|
||||
cmake = callPackage ../development/tools/build-managers/cmake {
|
||||
cmake = libsForQt5.callPackage ../development/tools/build-managers/cmake {
|
||||
inherit (darwin) ps;
|
||||
};
|
||||
|
||||
cmakeCurses = cmake.override { useNcurses = true; };
|
||||
|
||||
cmakeWithGui = cmakeCurses.override { useQt4 = true; };
|
||||
cmakeWithGui = cmakeCurses.override { withQt5 = true; };
|
||||
cmakeWithQt4Gui = cmakeCurses.override { useQt4 = true; };
|
||||
|
||||
# Does not actually depend on Qt 5
|
||||
inherit (kdeFrameworks) extra-cmake-modules kapidox kdoctools;
|
||||
|
|
Loading…
Reference in New Issue