Debian Codegraph @

test cases/windows/24 diasdk copy dll/meson.build

raw
1 project('diatest', 'cpp')
2
3 if host_machine.system() != 'windows'
4 error('MESON_SKIP_TEST: unsupported platform')
5 endif
6 cpp = meson.get_compiler('cpp', native: false)
7 is_msvc_clang = cpp.get_id() == 'clang' and cpp.get_define('_MSC_VER') != ''
8 if not ['msvc', 'clang-cl'].contains(cpp.get_id()) and not is_msvc_clang
9 error('MESON_SKIP_TEST: unsupported compiler')
10 endif
11
12 dia = dependency('diasdk', required: true)
13 dia_dll_name = dia.get_variable('dll')
14 fs = import('fs')
15 fs.copyfile( dia_dll_name )
16
17 conf = configuration_data()
18 conf.set('msdia_dll_name', fs.name(dia_dll_name))
19 configure_file(input: 'config.h.in', output: 'config.h', configuration: conf)
20
21 executable('dia_from_dll', ['dia_from_dll.cpp'], dependencies: [dia])