summaryrefslogtreecommitdiffstats
path: root/plugins/externaltools/data/meson.build
blob: 02d5d6cc156e34630e7b4b360524be0f964cc1e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
externaltools_tools = [
  'build',
  'remove-trailing-spaces',
  'send-to-fpaste',
]

if host_machine.system() == 'darwin'
  externaltools_tools += [
    'open-terminal-here-osx',
  ]
elif host_machine.system() != 'windows'
  externaltools_tools += [
    'open-terminal-here',
    'run-command',
  ]
endif

foreach tool_name: externaltools_tools
  dektop_file = custom_target(
    '@0@.desktop'.format(tool_name),
    input: '@0@.desktop.in'.format(tool_name),
    output: '@0@.desktop'.format(tool_name),
    command: msgfmt_externaltools_cmd,
    install: false,
  )

  custom_target(
    '@0@.tool'.format(tool_name),
    input: '@0@.tool.in'.format(tool_name),
    output: '@0@'.format(tool_name),
    depends: dektop_file,
    command: [
      merge_tool_prg,
      '@INPUT@',
      dektop_file.full_path(),
    ],
    capture: true,
    install: true,
    install_dir: join_paths(
      pkgdatadir,
      'plugins',
      'externaltools',
      'tools',
    )
  )
endforeach