aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2021-08-07 19:42:05 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2021-08-08 14:15:17 +0300
commit108fe84e7e2614ae847b2567c724cade4e95f0a0 (patch)
tree37ce3b224ea58f07c14dfc2272caeb8de3de9de3 /test cases
parent943596abbb1cba5b6b00051505df4ddd2480aee0 (diff)
downloadmeson-108fe84e7e2614ae847b2567c724cade4e95f0a0.zip
meson-108fe84e7e2614ae847b2567c724cade4e95f0a0.tar.gz
meson-108fe84e7e2614ae847b2567c724cade4e95f0a0.tar.bz2
Update iphone cross building.
Diffstat (limited to 'test cases')
-rw-r--r--test cases/osx/4 framework/meson.build27
1 files changed, 17 insertions, 10 deletions
diff --git a/test cases/osx/4 framework/meson.build b/test cases/osx/4 framework/meson.build
index 460b480..859d34e 100644
--- a/test cases/osx/4 framework/meson.build
+++ b/test cases/osx/4 framework/meson.build
@@ -8,16 +8,23 @@
# - "stat@sta" should be only "OpenGL.framework"
# see "xcode-frameworks.png" for an example
-project('xcode framework test', 'c', default_options : ['libdir=libtest'])
-
-dep_libs = dependency('appleframeworks', modules : ['OpenGL'], required : false)
-if not dep_libs.found()
- error('OpenGL framework not found')
-endif
-assert(dep_libs.type_name() == 'appleframeworks', 'type_name is wrong')
+project('xcode framework test', 'objc', default_options : ['libdir=libtest'])
dep_main = dependency('appleframeworks', modules : ['Foundation'])
-stlib = static_library('stat', 'stat.c', install : true, dependencies: dep_libs)
-exe = executable('prog', 'prog.c', install : true, dependencies: dep_main)
-
+if meson.is_cross_build()
+ # This is only available in iOS, not macOS. Just test finding it.
+ uikit_dep = dependency('appleframeworks', modules: 'UIKit')
+else
+ dep_libs = dependency('appleframeworks', modules : ['OpenGL'], required : false)
+ if not dep_libs.found()
+ error('OpenGL framework not found')
+ endif
+ assert(dep_libs.type_name() == 'appleframeworks', 'type_name is wrong')
+ stlib = static_library('stat', 'stat.c', install : true, dependencies: dep_libs)
+ exe = executable('prog', 'prog.c', install : true, dependencies: dep_main)
+ uikit_dep = dependency('appleframeworks', modules: 'UIKit', required: false)
+ if uikit_dep.found()
+ error('UIKit found on macOS even though it should not be there.')
+ endif
+endif