File: meson.build

package info (click to toggle)
gimp 3.0.4-6.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 210,548 kB
  • sloc: ansic: 842,405; lisp: 10,761; python: 10,318; cpp: 7,238; perl: 4,355; sh: 1,043; xml: 963; yacc: 609; lex: 348; javascript: 150; makefile: 43
file content (80 lines) | stat: -rw-r--r-- 3,668 bytes parent folder | download | duplicates (2)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80

if platform_windows
  gimp_debug_resume = executable('gimp-debug-resume',
    'gimp-debug-resume.c',
  )
endif


gimptool = executable('gimptool' + exec_ver,
  'gimptool.c',
  include_directories: rootInclude,
  dependencies: [
    gegl, gtk3,
  ],
  link_with: [
    libgimpbase,
  ],
  c_args: [
    '-DDATADIR="@0@"'.format(get_option('datadir')),
  ],
  install: true,
)

gimp_test_clipboard = executable('gimp-test-clipboard' + exec_ver,
  'gimp-test-clipboard.c',
  include_directories: rootInclude,
  dependencies: [
    gegl, gtk3,
  ],
  install: true,
)

if isocodes.found()
  native_gio    = dependency('gio-2.0', native: true)
  gen_languages = executable('gen-languages',
                             'gen-languages.c',
                             '../app/config/gimpxmlparser.c',
                             include_directories: [ rootInclude, appInclude ],
                             dependencies: [ native_gio ],
                             c_args: [
                               '-DSRCDIR="@0@"'.format(meson.project_source_root()),
                               '-DISOCODES_LOCALEDIR="@0@"'.format(isocodes_localedir),
                             ],
                             native: true,
                             install: false)
endif

if enable_default_bin
  if not platform_windows
    install_symlink(fs.name(gimptool.full_path()).replace(exec_ver, ''),
                    pointing_to: fs.name(gimptool.full_path()),
                    install_dir: get_option('bindir'))
    install_symlink(fs.name(gimptool.full_path()).replace(exec_ver, '-@0@'.format(api_version_major)),
                    pointing_to: fs.name(gimptool.full_path()),
                    install_dir: get_option('bindir'))

    install_symlink(fs.name(gimp_test_clipboard.full_path()).replace(exec_ver, ''),
                    pointing_to: fs.name(gimp_test_clipboard.full_path()),
                    install_dir: get_option('bindir'))
    install_symlink(fs.name(gimp_test_clipboard.full_path()).replace(exec_ver, '-@0@'.format(api_version_major)),
                    pointing_to: fs.name(gimp_test_clipboard.full_path()),
                    install_dir: get_option('bindir'))
  else
    meson.add_install_script(python, '-c', 'from shutil import copy2; from pathlib import Path; from sys import argv; copy2(argv[1], str(Path(argv[2]) / "bin" / argv[3]))',
                             gimptool.full_path(), get_option('prefix'), fs.name(gimptool.name()).replace(exec_ver, '.exe'))
    meson.add_install_script(python, '-c', 'from shutil import copy2; from pathlib import Path; from sys import argv; copy2(argv[1], str(Path(argv[2]) / "bin" / argv[3].replace("@0@", argv[4])))',
                             gimptool.full_path(), get_option('prefix'), fs.name(gimptool.name()).replace(exec_ver, '-@0@.exe'), api_version_major.to_string())

    meson.add_install_script(python, '-c', 'from shutil import copy2; from pathlib import Path; from sys import argv; copy2(argv[1], str(Path(argv[2]) / "bin" / argv[3]))',
                             gimp_test_clipboard.full_path(), get_option('prefix'), fs.name(gimp_test_clipboard.name()).replace(exec_ver, '.exe'))
    meson.add_install_script(python, '-c', 'from shutil import copy2; from pathlib import Path; from sys import argv; copy2(argv[1], str(Path(argv[2]) / "bin" / argv[3].replace("@0@", argv[4])))',
                             gimp_test_clipboard.full_path(), get_option('prefix'), fs.name(gimp_test_clipboard.name()).replace(exec_ver, '-@0@.exe'), api_version_major.to_string())
  endif
endif

executable('kernelgen',
  'kernelgen.c',
  include_directories: rootInclude,
  install: false,
)