-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This uses objfw-config to get to the flags, however, there's still several todos that can only be addressed once dependencies can have per-language flags.
- Loading branch information
Showing
10 changed files
with
160 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## A new dependency for ObjFW is now supported | ||
|
||
For example, you can create a simple application written using ObjFW like this: | ||
|
||
```meson | ||
project('SimpleApp', 'objc') | ||
objfw_dep = dependency('objfw', version: '>= 1.0') | ||
executable('SimpleApp', 'SimpleApp.m', | ||
dependencies: [objfw_dep]) | ||
``` | ||
|
||
Modules are also supported. A test case using ObjFWTest can be created like | ||
this: | ||
|
||
```meson | ||
project('Tests', 'objc') | ||
objfwtest_dep = dependency('objfw', version: '>= 1.1', modules: ['ObjFWTest']) | ||
executable('Tests', ['FooTest.m', 'BarTest.m'], | ||
dependencies: [objfwtest_dep]) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#import <ObjFW/ObjFW.h> | ||
#import <ObjFWTest/ObjFWTest.h> | ||
|
||
@interface SimpleTest: OTTestCase | ||
@end | ||
|
||
@implementation SimpleTest | ||
- (void)testMeson { | ||
} | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#import <ObjFW/ObjFW.h> | ||
|
||
@interface TestApplication: OFObject <OFApplicationDelegate> | ||
@end | ||
|
||
OF_APPLICATION_DELEGATE(TestApplication) | ||
|
||
@implementation TestApplication | ||
- (void)applicationDidFinishLaunching: (OFNotification *)notification { | ||
[OFApplication terminate]; | ||
} | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
project('objfw build tests', 'objc') | ||
|
||
objfw_dep = dependency('objfw', required: false) | ||
objfwtest_dep = dependency('objfw', modules: ['ObjFWTest'], required: false) | ||
|
||
if not objfw_dep.found() or not objfwtest_dep.found() | ||
error('MESON_SKIP_TEST: Need objfw dependency') | ||
endif | ||
|
||
executable('TestApplication', 'TestApplication.m', | ||
dependencies: [objfw_dep]) | ||
|
||
executable('SimpleTest', 'SimpleTest.m', | ||
dependencies: [objfwtest_dep]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#import <ObjFW/ObjFW.h> | ||
#import <ObjFWTest/ObjFWTest.h> | ||
|
||
@interface SimpleTest: OTTestCase | ||
@end | ||
|
||
@implementation SimpleTest | ||
- (void)testMeson { | ||
} | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#import <ObjFW/ObjFW.h> | ||
|
||
@interface TestApplication: OFObject <OFApplicationDelegate> | ||
@end | ||
|
||
OF_APPLICATION_DELEGATE(TestApplication) | ||
|
||
@implementation TestApplication | ||
- (void)applicationDidFinishLaunching: (OFNotification *)notification { | ||
[OFApplication terminate]; | ||
} | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
project('objfw build tests', 'objcpp') | ||
|
||
objfw_dep = dependency('objfw', required: false) | ||
objfwtest_dep = dependency('objfw', modules: ['ObjFWTest'], required: false) | ||
|
||
if not objfw_dep.found() or not objfwtest_dep.found() | ||
error('MESON_SKIP_TEST: Need objfw dependency') | ||
endif | ||
|
||
executable('TestApplication', 'TestApplication.mm', | ||
dependencies: [objfw_dep]) | ||
|
||
executable('SimpleTest', 'SimpleTest.mm', | ||
dependencies: [objfwtest_dep]) |