From 8de531328859bfe2272b24d9897bbca5b0f9fbc7 Mon Sep 17 00:00:00 2001 From: blackbox Date: Sun, 9 Apr 2017 22:02:16 +0200 Subject: unit-test for testing xcode frameworks --- test cases/osx/4 framework/meson.build | 18 ++++++++++++++++++ test cases/osx/4 framework/prog.c | 3 +++ test cases/osx/4 framework/stat.c | 1 + test cases/osx/4 framework/xcode-frameworks.png | Bin 0 -> 421385 bytes 4 files changed, 22 insertions(+) create mode 100644 test cases/osx/4 framework/meson.build create mode 100644 test cases/osx/4 framework/prog.c create mode 100644 test cases/osx/4 framework/stat.c create mode 100644 test cases/osx/4 framework/xcode-frameworks.png (limited to 'test cases/osx') 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 Binary files /dev/null and b/test cases/osx/4 framework/xcode-frameworks.png differ -- cgit v1.1