Merge pull request #40566 from obsidiansystems/strictDeps-for-18.03

cmake: Fix build and setup hook
This commit is contained in:
John Ericson 2018-05-15 16:31:17 -04:00 committed by GitHub
commit ce018be2d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -82,6 +82,10 @@ stdenv.mkDerivation rec {
configureFlags = [
"--docdir=share/doc/${name}"
] ++ (if useSharedLibraries then [ "--no-system-jsoncpp" "--system-libs" ] else [ "--no-system-libs" ]) # FIXME: cleanup
++ optional (useQt4 || withQt5) "--qt-gui"
++ [
"--"
# We should set the proper `CMAKE_SYSTEM_NAME`.
# http://www.cmake.org/Wiki/CMake_Cross_Compiling
#
@ -93,10 +97,7 @@ stdenv.mkDerivation rec {
"-DCMAKE_AR=${getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar"
"-DCMAKE_RANLIB=${getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ranlib"
"-DCMAKE_STRIP=${getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}strip"
] ++ (if useSharedLibraries then [ "--no-system-jsoncpp" "--system-libs" ] else [ "--no-system-libs" ]) # FIXME: cleanup
++ optional (useQt4 || withQt5) "--qt-gui"
++ ["--"]
++ optionals (!useNcurses) [ "-DBUILD_CursesDialog=OFF" ];
] ++ optionals (!useNcurses) [ "-DBUILD_CursesDialog=OFF" ];
dontUseCmakeConfigure = true;
enableParallelBuilding = true;

View File

@ -38,7 +38,7 @@ cmakeConfigurePhase() {
cmakeFlags="-DCMAKE_CXX_COMPILER=$CXX $cmakeFlags"
cmakeFlags="-DCMAKE_C_COMPILER=$CC $cmakeFlags"
cmakeFlags="-DCMAKE_AR=$(command -v $AR) $cmakeFlags"
cmakeFlags="-DCMAKE_RANLIB=$(command -v $RANLAB) $cmakeFlags"
cmakeFlags="-DCMAKE_RANLIB=$(command -v $RANLIB) $cmakeFlags"
cmakeFlags="-DCMAKE_STRIP=$(command -v $STRIP) $cmakeFlags"
# on macOS we want to prefer Unix-style headers to Frameworks