parent
d3e73e0dbc
commit
3be01a7e7b
7 changed files with 40 additions and 2 deletions
@ -0,0 +1,6 @@ |
||||
#!/usr/bin/env python |
||||
|
||||
import sys |
||||
import shutil |
||||
|
||||
shutil.copyfile(sys.argv[1], sys.argv[2]) |
@ -1,5 +1,8 @@ |
||||
#include"bob.h" |
||||
|
||||
#ifdef _MSC_VER |
||||
__declspec(dllexport) |
||||
#endif |
||||
const char* get_bob() { |
||||
return "bob"; |
||||
} |
||||
|
@ -1,3 +1,6 @@ |
||||
#pragma once |
||||
|
||||
#ifdef _MSC_VER |
||||
__declspec(dllimport) |
||||
#endif |
||||
const char* get_bob(); |
||||
|
@ -0,0 +1,7 @@ |
||||
#!/usr/bin/env python |
||||
|
||||
import os |
||||
import sys |
||||
|
||||
with open(sys.argv[1], 'w') as f: |
||||
f.write('') |
@ -1,7 +1,16 @@ |
||||
project('bob', 'c') |
||||
|
||||
boblib = static_library('bob', 'bob.c') |
||||
gensrc_py = find_program('genbob.py') |
||||
genbob_h = custom_target('genbob.h', |
||||
output : 'genbob.h', |
||||
command : [gensrc_py, '@OUTPUT@']) |
||||
genbob_c = custom_target('genbob.c', |
||||
output : 'genbob.c', |
||||
command : [gensrc_py, '@OUTPUT@']) |
||||
|
||||
boblib = library('bob', ['bob.c', genbob_c]) |
||||
bobinc = include_directories('.') |
||||
|
||||
bob_dep = declare_dependency(link_with : boblib, |
||||
sources : [genbob_h], |
||||
include_directories : bobinc) |
||||
|
Loading…
Reference in new issue