aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/csharp/2 library/meson.build
blob: 6b246a4bd242cda38e79c6f279ab31a383ceb99a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
project('C# library', 'cs')

python3 = import('python3').find_python()
generated_sources = custom_target('gen_sources',
    input: 'helper.cs',
    output: 'helper.cs',
    command: [python3, '-c',
      'import shutil, sys; shutil.copyfile(sys.argv[1], sys.argv[2])',
      '@INPUT@', '@OUTPUT@']
)

l = shared_library('helper', generated_sources, install : true)

e = executable('prog', 'prog.cs', link_with : l, install : true)
test('libtest', e)