commit
003696fc27
7 changed files with 28 additions and 4 deletions
@ -0,0 +1,6 @@ |
||||
project('proj', 'c') |
||||
subproject('sub') |
||||
libSub = dependency('sub', fallback: ['sub', 'libSub']) |
||||
|
||||
exe = executable('prog', 'prog.c', dependencies: libSub) |
||||
test('subproject subdir', exe) |
@ -0,0 +1,5 @@ |
||||
#include <sub.h> |
||||
|
||||
int main() { |
||||
return sub(); |
||||
} |
@ -0,0 +1,2 @@ |
||||
lib = static_library('sub', 'sub.c') |
||||
libSub = declare_dependency(include_directories: include_directories('.'), link_with: lib) |
@ -0,0 +1,5 @@ |
||||
#include "sub.h" |
||||
|
||||
int sub() { |
||||
return 0; |
||||
} |
@ -0,0 +1,6 @@ |
||||
#ifndef SUB_H |
||||
#define SUB_H |
||||
|
||||
int sub(); |
||||
|
||||
#endif |
@ -0,0 +1,2 @@ |
||||
project('sub', 'c') |
||||
subdir('lib') |
Loading…
Reference in new issue