diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2017-06-15 14:43:50 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2017-06-16 19:39:51 +0000 |
commit | 0b112fa0b27f996fd71c5a0b63132b47b21d7b3e (patch) | |
tree | 02e2789c56fd3b3c2545bab7023ae662bbf9019c /tests | |
parent | e16dd899d5d8329aaa83b77393e50e5feba247ca (diff) |
Collect cpp.[weak]frameworks from library dependencies
When depending on a static library that needs a macOS framework, we
should automatically link against that framework, like we do with
other kinds of libraries.
Task-number: QBS-1129
Change-Id: Ibe20d874b0baba5c78ef13ad6961b5812ecd8918
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/api/testdata/static-lib-deps/d.cpp | 2 | ||||
-rw-r--r-- | tests/auto/api/testdata/static-lib-deps/d.mm | 8 | ||||
-rw-r--r-- | tests/auto/api/testdata/static-lib-deps/static-lib-deps.qbs | 6 |
3 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/api/testdata/static-lib-deps/d.cpp b/tests/auto/api/testdata/static-lib-deps/d.cpp index 7c6812837..a7ecfd1ee 100644 --- a/tests/auto/api/testdata/static-lib-deps/d.cpp +++ b/tests/auto/api/testdata/static-lib-deps/d.cpp @@ -31,6 +31,7 @@ #elif defined(WITH_LEX_YACC) extern "C" int yywrap(void); extern "C" void yyerror(char const *s); +extern void printGreeting(); #elif defined(WITH_SETUPAPI) #include <windows.h> #include <Setupapi.h> @@ -50,6 +51,7 @@ int d() #elif defined(WITH_LEX_YACC) yywrap(); yyerror("no error"); + printGreeting(); return 0; #elif defined(WITH_SETUPAPI) CABINET_INFO ci; diff --git a/tests/auto/api/testdata/static-lib-deps/d.mm b/tests/auto/api/testdata/static-lib-deps/d.mm new file mode 100644 index 000000000..5bf48966f --- /dev/null +++ b/tests/auto/api/testdata/static-lib-deps/d.mm @@ -0,0 +1,8 @@ +#import <Foundation/Foundation.h> + +void printGreeting() +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + NSLog (@"Hello darkness, my old friend!"); + [pool drain]; +} diff --git a/tests/auto/api/testdata/static-lib-deps/static-lib-deps.qbs b/tests/auto/api/testdata/static-lib-deps/static-lib-deps.qbs index abb9dbf9d..c925d4d57 100644 --- a/tests/auto/api/testdata/static-lib-deps/static-lib-deps.qbs +++ b/tests/auto/api/testdata/static-lib-deps/static-lib-deps.qbs @@ -45,6 +45,11 @@ Project { "d.cpp", ] + Group { + condition: qbs.targetOS.contains("macos") + files: ["d.mm"] + } + Properties { condition: qbs.targetOS.contains("windows") cpp.defines: ["WITH_SETUPAPI"] @@ -54,6 +59,7 @@ Project { condition: qbs.targetOS.contains("macos") cpp.defines: ["WITH_LEX_YACC"] cpp.staticLibraries: ["l", "y"] + cpp.frameworks: ["Foundation"] } Properties { condition: qbs.targetOS.contains("linux") |