From b53902f535f2c63d71e916b9de22dbcfeec9d99e Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Tue, 28 Jul 2020 19:05:43 +0300 Subject: [PATCH] cmake: fix CMAKE_FIND_FRAMEWORK --- pkgs/applications/gis/openorienteering-mapper/default.nix | 2 -- pkgs/applications/networking/irc/weechat/default.nix | 2 +- pkgs/development/compilers/mozart/default.nix | 2 +- pkgs/development/tools/build-managers/cmake/setup-hook.sh | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/gis/openorienteering-mapper/default.nix b/pkgs/applications/gis/openorienteering-mapper/default.nix index 39f8694dd177..540fa2718975 100644 --- a/pkgs/applications/gis/openorienteering-mapper/default.nix +++ b/pkgs/applications/gis/openorienteering-mapper/default.nix @@ -56,8 +56,6 @@ mkDerivation rec { "-DLICENSING_PROVIDER:BOOL=OFF" "-DMapper_MANUAL_QTHELP:BOOL=OFF" ] ++ stdenv.lib.optionals stdenv.isDarwin [ - # Usually enabled on Darwin - "-DCMAKE_FIND_FRAMEWORK=never" # FindGDAL is broken and always finds /Library/Framework unless this is # specified "-DGDAL_INCLUDE_DIR=${gdal}/include" diff --git a/pkgs/applications/networking/irc/weechat/default.nix b/pkgs/applications/networking/irc/weechat/default.nix index 69c9aeaf8915..ea00669006bd 100644 --- a/pkgs/applications/networking/irc/weechat/default.nix +++ b/pkgs/applications/networking/irc/weechat/default.nix @@ -44,7 +44,7 @@ let "-DENABLE_JAVASCRIPT=OFF" # Requires v8 <= 3.24.3, https://github.com/weechat/weechat/issues/360 "-DENABLE_PHP=OFF" ] - ++ optionals stdenv.isDarwin ["-DICONV_LIBRARY=${libiconv}/lib/libiconv.dylib" "-DCMAKE_FIND_FRAMEWORK=LAST"] + ++ optionals stdenv.isDarwin ["-DICONV_LIBRARY=${libiconv}/lib/libiconv.dylib"] ++ map (p: "-D${p.cmakeFlag}=" + (if p.enabled then "ON" else "OFF")) plugins ; diff --git a/pkgs/development/compilers/mozart/default.nix b/pkgs/development/compilers/mozart/default.nix index b8951c8c8004..b11b6b9642cd 100644 --- a/pkgs/development/compilers/mozart/default.nix +++ b/pkgs/development/compilers/mozart/default.nix @@ -61,7 +61,7 @@ in stdenv.mkDerivation rec { # gcc together as compilers and we need clang for the sources generation. # However, clang emits tons of warnings about gcc's atomic-base library. "-DCMAKE_CXX_FLAGS=-Wno-braced-scalar-init" - ] ++ lib.optional stdenv.isDarwin "-DCMAKE_FIND_FRAMEWORK=LAST"; + ]; fixupPhase = '' wrapProgram $out/bin/oz --set OZEMACS ${emacs}/bin/emacs diff --git a/pkgs/development/tools/build-managers/cmake/setup-hook.sh b/pkgs/development/tools/build-managers/cmake/setup-hook.sh index 73f24a9a2054..ab85c041d15d 100755 --- a/pkgs/development/tools/build-managers/cmake/setup-hook.sh +++ b/pkgs/development/tools/build-managers/cmake/setup-hook.sh @@ -48,7 +48,7 @@ cmakeConfigurePhase() { # on macOS we want to prefer Unix-style headers to Frameworks # because we usually do not package the framework - cmakeFlags="-DCMAKE_FIND_FRAMEWORK=last $cmakeFlags" + cmakeFlags="-DCMAKE_FIND_FRAMEWORK=LAST $cmakeFlags" # on macOS i686 was only relevant for 10.5 or earlier. cmakeFlags="-DCMAKE_OSX_ARCHITECTURES=x86_64 $cmakeFlags"