aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorblackbox <roger@boerdijk.org>2017-04-09 22:02:16 +0200
committerRoger Boerdijk <git@boerdijk.org>2017-05-23 12:54:33 +0200
commit8de531328859bfe2272b24d9897bbca5b0f9fbc7 (patch)
tree77ae59c60c5f69eda73409ffc049f824ad886277 /test cases
parentdb176c85dbe67b412c7cacef63f5c2d09fd7f246 (diff)
downloadmeson-8de531328859bfe2272b24d9897bbca5b0f9fbc7.zip
meson-8de531328859bfe2272b24d9897bbca5b0f9fbc7.tar.gz
meson-8de531328859bfe2272b24d9897bbca5b0f9fbc7.tar.bz2
unit-test for testing xcode frameworks
Diffstat (limited to 'test cases')
-rw-r--r--test cases/osx/4 framework/meson.build18
-rw-r--r--test cases/osx/4 framework/prog.c3
-rw-r--r--test cases/osx/4 framework/stat.c1
-rw-r--r--test cases/osx/4 framework/xcode-frameworks.pngbin0 -> 421385 bytes
4 files changed, 22 insertions, 0 deletions
diff --git a/test cases/osx/4 framework/meson.build b/test cases/osx/4 framework/meson.build
new file mode 100644
index 0000000..8d93bf9
--- /dev/null
+++ b/test cases/osx/4 framework/meson.build
@@ -0,0 +1,18 @@
+# Primitive test for adding frameworks in XCode
+# When opening the xcodeproj, the Folder "Frameworks" should contain two frameworks (OpenGL.framework and Foundation.framework)
+# "Target Membership" of ...
+# - OpenGL.framework should be only to prog@exe
+# - Foundation.framework should be only to stat@sta
+# "Build Phase" / "Link Binary with Libraries" for the target
+# - "prog@exe" should be only "Foundation.framework"
+# - "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 : true)]
+dep_main = [dependency('appleframeworks', modules : ['Foundation'], required : true)]
+
+stlib = static_library('stat', 'stat.c', install : true, dependencies: dep_libs)
+exe = executable('prog', 'prog.c', install : true, dependencies: dep_main)
+
diff --git a/test cases/osx/4 framework/prog.c b/test cases/osx/4 framework/prog.c
new file mode 100644
index 0000000..11b7fad
--- /dev/null
+++ b/test cases/osx/4 framework/prog.c
@@ -0,0 +1,3 @@
+int main(int argc, char **argv) {
+ return 0;
+}
diff --git a/test cases/osx/4 framework/stat.c b/test cases/osx/4 framework/stat.c
new file mode 100644
index 0000000..fa76a65
--- /dev/null
+++ b/test cases/osx/4 framework/stat.c
@@ -0,0 +1 @@
+int func() { return 933; }
diff --git a/test cases/osx/4 framework/xcode-frameworks.png b/test cases/osx/4 framework/xcode-frameworks.png
new file mode 100644
index 0000000..673d05a
--- /dev/null
+++ b/test cases/osx/4 framework/xcode-frameworks.png
Binary files differ