cmake: fix darwin build

HAVE_APPLICATION_SERVICES always gets set if cmake is available.
This commit is contained in:
Daiderd Jordan 2018-05-28 13:46:45 +02:00
parent e1b501a7f6
commit 02dcc8d734
No known key found for this signature in database
GPG key ID: D02435D05B810C96
2 changed files with 21 additions and 1 deletions

View file

@ -0,0 +1,16 @@
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 2008a0b..5a3e8ee 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -35,11 +35,6 @@
struct cmLinkImplementation;
-#if defined(CMAKE_BUILD_WITH_CMAKE) && defined(__APPLE__)
-#define HAVE_APPLICATION_SERVICES
-#include <ApplicationServices/ApplicationServices.h>
-#endif
-
#if defined(CMAKE_BUILD_WITH_CMAKE)
#include "cmXMLParser.h"

View file

@ -57,6 +57,8 @@ stdenv.mkDerivation rec {
# Don't search in non-Nix locations such as /usr, but do search in our libc.
patches = [ ./search-path-3.9.patch ]
# Don't depend on frameworks.
++ optional useSharedLibraries ./application-services.patch # TODO: remove conditional
++ optional stdenv.isCygwin ./3.2.2-cygwin.patch;
outputs = [ "out" ];
@ -101,7 +103,9 @@ 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"
] ++ optionals (!useNcurses) [ "-DBUILD_CursesDialog=OFF" ];
]
# Avoid depending on frameworks.
++ optional (!useNcurses) "-DBUILD_CursesDialog=OFF";
dontUseCmakeConfigure = true;
enableParallelBuilding = true;