diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2014-06-04 22:08:20 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2014-06-04 22:08:20 +0300 |
commit | 9abe913a1f6556e504592867bd623370312910de (patch) | |
tree | 5c52703575da8be9952387863f9fcd2a53a624ed /tools | |
parent | 355371374ce618f1f396aea2122da0debd9a1e16 (diff) | |
download | meson-9abe913a1f6556e504592867bd623370312910de.zip meson-9abe913a1f6556e504592867bd623370312910de.tar.gz meson-9abe913a1f6556e504592867bd623370312910de.tar.bz2 |
Convert library targets.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/cmake2meson.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/cmake2meson.py b/tools/cmake2meson.py index 94197fa..9e27151 100755 --- a/tools/cmake2meson.py +++ b/tools/cmake2meson.py @@ -188,6 +188,17 @@ class Converter: line = "%s = find_library('%s')" % (t.args[0].value.lower(), t.args[0].value) elif t.name == 'add_executable': line = '%s_exe = executable(%s)' % (t.args[0].value, self.convert_args(t.args, False)) + elif t.name == 'add_library': + if t.args[1].value == 'SHARED': + libcmd = 'shared_library' + args = [t.args[0]] + t.args[2:] + elif t.args[1].value == 'STATIC': + libcmd = 'static_library' + args = [t.args[0]] + t.args[2:] + else: + libcmd = 'static_library' + args = t.args + line = '%s_lib = %s(%s)' % (t.args[0].value, libcmd, self.convert_args(args, False)) elif t.name == 'option': optname = t.args[0].value description = t.args[1].value |