Fix appleframeworks with multiple modules.

pull/5042/head
Jussi Pakkanen 6 years ago
parent c6012e3cc7
commit c34f044814
  1. 2
      mesonbuild/dependencies/platform.py
  2. 5
      test cases/osx/6 multiframework/main.m
  3. 13
      test cases/osx/6 multiframework/meson.build

@ -34,7 +34,7 @@ class AppleFrameworks(ExternalDependency):
args = self.clib_compiler.find_framework(f, env, [])
if args is not None:
# No compile args are needed for system frameworks
self.link_args = args
self.link_args += args
else:
self.is_found = False

@ -0,0 +1,5 @@
#import <Cocoa/Cocoa.h>
int main(int argc, const char * argv[]) {
return NSApplicationMain(argc, argv);
}

@ -0,0 +1,13 @@
project('multiframework', 'objc')
# In theory only 'AppKit' would be enough but there was a bug
# that causes a build failure when defining two modules. The
# arguments for the latter module overwrote the arguments for
# the first one rather than adding to them.
cocoa_dep = dependency('appleframeworks', modules : ['AppKit', 'foundation'])
executable('deptester',
'main.m',
objc_args : ['-fobjc-arc'],
dependencies : [cocoa_dep],
)
Loading…
Cancel
Save