parent
2984d421b7
commit
0962909120
6 changed files with 52 additions and 1 deletions
@ -0,0 +1,6 @@ |
||||
project('dep fallback', 'c') |
||||
|
||||
bob = dependency('boblib', fallback : ['boblib', 'bob_dep']) |
||||
|
||||
exe = executable('bobtester', 'tester.c', dependencies : bob) |
||||
test('bobtester', exe) |
@ -0,0 +1,5 @@ |
||||
#include"bob.h" |
||||
|
||||
const char* get_bob() { |
||||
return "bob"; |
||||
} |
@ -0,0 +1,3 @@ |
||||
#pragma once |
||||
|
||||
const char* get_bob(); |
@ -0,0 +1,7 @@ |
||||
project('bob', 'c') |
||||
|
||||
boblib = static_library('bob', 'bob.c') |
||||
bobinc = include_directories('.') |
||||
|
||||
bob_dep = declare_dependency(link_with : boblib, |
||||
include_directories : bobinc) |
@ -0,0 +1,13 @@ |
||||
#include"bob.h" |
||||
#include<string.h> |
||||
#include<stdio.h> |
||||
|
||||
int main(int argc, char **argv) { |
||||
if(strcmp("bob", get_bob()) == 0) { |
||||
printf("Bob is indeed bob.\n"); |
||||
} else { |
||||
printf("ERROR: bob is not bob.\n"); |
||||
return 1; |
||||
} |
||||
return 0; |
||||
} |
Loading…
Reference in new issue