summaryrefslogtreecommitdiff
path: root/src/lib/eio/meson.build
blob: f95a1e652c30bf9b6655356fa010ed7412fb13d0 (plain) (blame)
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
pub_eo_file_target = []

pub_eo_files = [
  'efl_io_model.eo',
  'efl_io_manager.eo',
  'eio_sentry.eo'
]

foreach eo_file : pub_eo_files
  pub_eo_file_target += custom_target('eolian_gen_' + eo_file,
    input : eo_file,
    output : [eo_file + '.h'],
    depfile : eo_file + '.d',
    install : true,
    install_dir : dir_package_include,
    command : eolian_gen + [ '-I', meson.current_source_dir(), eolian_include_directories,
                           '-o', 'h:' + join_paths(
                           meson.current_build_dir(), eo_file + '.h'),
                           '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'),
                           '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'),
                           '-gchd', '@INPUT@'])
endforeach

pub_eo_types_files = []

eolian_include_directories += ['-I', meson.current_source_dir()]

eio_header_src = [
  'Eio.h',
  'Eio_Legacy.h',
  'Eio_Eo.h',
  'eio_inline_helper.x'
]

eio_src = [
  'eio_dir.c',
  'eio_eet.c',
  'eio_file.c',
  'efl_io_manager.c',
  'eio_sentry.c',
  'eio_main.c',
  'eio_map.c',
  'eio_monitor.c',
  'eio_monitor_poll.c',
  'eio_single.c',
  'eio_xattr.c',
  'efl_io_model.c',
  'efl_io_model_private.h',
  'eio_private.h',
  'eio_sentry_private.h'
]

linker_args = []

if sys_windows == true
  eio_src += ['eio_monitor_win32.c']
elif sys_osx == true
  eio_src += ['eio_monitor_cocoa.c']
  linker_args = [['-framework', 'CoreServices']]
elif sys_linux == true
  eio_src += ['eio_monitor_inotify.c']
elif sys_bsd == true
  eio_src += ['eio_monitor_kevent.c']
endif

eio_deps = [ecore, ecore_file, eet, eo, eina, efl, emile, efreet_mime]
eio_pub_deps = [eina, eet]

eio_lib = library('eio',
    eio_src, pub_eo_file_target,
    dependencies: [eina, eo, efl, m, eio_deps],
    include_directories : config_dir + [include_directories('.')],
    install: true,
    c_args : package_c_args,
    link_args : linker_args,
    version : meson.project_version()
)

eio = declare_dependency(
  include_directories: [include_directories('.')],
  link_with: eio_lib,
  sources : pub_eo_file_target + priv_eo_file_target,
  dependencies: eio_pub_deps,
)


if get_option('install-eo-files')
  install_data(pub_eo_files + pub_eo_types_files,
    install_dir: join_paths(eolian_include_dir, package_version_name)
  )
endif

install_headers(eio_header_src,
  install_dir : dir_package_include,
)