summaryrefslogtreecommitdiff
path: root/src/lib/evil/meson.build
blob: d9bef68e64ef29088c485297dbb2aaff2f8e4fff (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
if target_machine.system() == 'windows'
  #subdir('unposix')

  evil_src = [
    'evil_dlfcn.c',
    'evil_fcntl.c',
    'evil_langinfo.c',
    'evil_locale.c',
    'evil_main.c',
    'evil_mman.c',
    'evil_stdio.c',
    'evil_stdlib.c',
    'evil_string.c',
    'evil_time.c',
    'evil_unistd.c',
    'evil_util.c',
    'evil_private.h',
    'evil_basename.c',
    'pcre/regex.h',
  ]

  psapi = cc.find_library('psapi')
  ole32 = cc.find_library('ole32')
  ws2_32 = cc.find_library('ws2_32')
  secur32 = cc.find_library('secur32')
  uuid = cc.find_library('uuid')

  evil_deps = [psapi, ole32, ws2_32, secur32, uuid, pcre_dep, getopt_dep]
  evil_pub_deps = [psapi, ole32, ws2_32, secur32, uuid, pcre_dep, getopt_dep]

  evil_lib = library('evil', evil_src,
    c_args : ['-DEVIL_BUILD', '-DEVIL_DLL', '-DPCRE_STATIC'],
    dependencies : evil_deps,
    include_directories : [config_dir, 'unposix'],
    install: true,
    version: meson.project_version(),
  )

  evil = declare_dependency(
    include_directories: [include_directories('.', 'unposix')],
    dependencies : evil_pub_deps,
    link_with: evil_lib,
  )
else
  evil = declare_dependency()
endif

automatic_pkgfile = false