[vlc-commits] keychain: Do not link against Cocoa

David Fuhrmann git at videolan.org
Tue May 19 22:31:32 CEST 2020


vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Tue May 19 22:29:14 2020 +0200| [c7b6983e6dd4641cc434a085342680e0ea30d396] | committer: David Fuhrmann

keychain: Do not link against Cocoa

This is a module used for both iOS as well as macOS, so it should
only use frameworks available on both platforms. And in fact,
linking against Cocoa is not necessary for macOS as well.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c7b6983e6dd4641cc434a085342680e0ea30d396
---

 modules/keystore/Makefile.am | 4 ----
 modules/keystore/keychain.m  | 7 +------
 2 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/modules/keystore/Makefile.am b/modules/keystore/Makefile.am
index 57ae2273f6..318132881f 100644
--- a/modules/keystore/Makefile.am
+++ b/modules/keystore/Makefile.am
@@ -30,10 +30,6 @@ libkeychain_plugin_la_SOURCES = keystore/keychain.m keystore/list_util.c keystor
 libkeychain_plugin_la_OBJCFLAGS = $(AM_OBJCFLAGS) -fobjc-arc
 libkeychain_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(keystoredir)' -Wl,-framework,Foundation -Wl,-framework,Security
 
-if HAVE_OSX
-libkeychain_plugin_la_LDFLAGS += -Wl,-framework,Cocoa
-endif
-
 if HAVE_DARWIN
 keystore_LTLIBRARIES += libkeychain_plugin.la
 endif
diff --git a/modules/keystore/keychain.m b/modules/keystore/keychain.m
index f7fa1532bb..353f152c93 100644
--- a/modules/keystore/keychain.m
+++ b/modules/keystore/keychain.m
@@ -32,12 +32,7 @@
 
 #include <TargetConditionals.h>
 
-#if TARGET_OS_IPHONE
-  #import <Foundation/Foundation.h>
-#else
-  #import <Cocoa/Cocoa.h>
-#endif
-
+#import <Foundation/Foundation.h>
 #import <Security/Security.h>
 
 // Marker to recognize changed format in vlc 4: secret does not have \0 cut off anymore.



More information about the vlc-commits mailing list