summaryrefslogtreecommitdiff
path: root/sal/meson.build
blob: 621685f1cd5d8de3fca99e280c9a41ff89adf74a (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
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
unix_common = [
  'osl/unx/backtraceapi.cxx',
  'osl/unx/conditn.cxx',
  'osl/unx/file.cxx',
  'osl/unx/file_error_transl.cxx',
  'osl/unx/file_misc.cxx',
  'osl/unx/file_path_helper.cxx',
  'osl/unx/file_stat.cxx',
  'osl/unx/file_url.cxx',
  'osl/unx/file_volume.cxx',
  'osl/unx/interlck.cxx',
  'osl/unx/memory.cxx',
  'osl/unx/module.cxx',
  'osl/unx/mutex.cxx',
  'osl/unx/nlsupport.cxx',
  'osl/unx/pipe.cxx',
  'osl/unx/process.cxx',
  'osl/unx/process_impl.cxx',
  'osl/unx/profile.cxx',
  'osl/unx/random.cxx',
  'osl/unx/readwrite_helper.cxx',
  'osl/unx/salinit.cxx',
  'osl/unx/security.cxx',
  'osl/unx/signal.cxx',
  'osl/unx/socket.cxx',
  'osl/unx/soffice.cxx',
  'osl/unx/tempfile.cxx',
  'osl/unx/thread.cxx',
  'osl/unx/time.cxx',
  'osl/unx/uunxapi.cxx',
]


if host_machine.system() == 'windows'
  system_sources = [
    'osl/w32/backtrace.cxx',
    'osl/w32/interlck.cxx',
    'osl/w32/process.cxx',
    'osl/w32/socket.cxx',
    'osl/w32/conditn.cxx',
    'osl/w32/memory.cxx',
    'osl/w32/procimpl.cxx',
    'osl/w32/tempfile.cxx',
    'osl/w32/dllentry.cxx',
    'osl/w32/module.cxx',
    'osl/w32/profile.cxx',
    'osl/w32/thread.cxx',
    'osl/w32/file.cxx',
    'osl/w32/mutex.cxx',
    'osl/w32/random.cxx',
    'osl/w32/time.cxx',
    'osl/w32/file_dirvol.cxx',
    'osl/w32/nlsupport.cxx',
    'osl/w32/salinit.cxx',
    'osl/w32/file_error.cxx',
    'osl/w32/path_helper.cxx',
    'osl/w32/security.cxx',
    'osl/w32/file_url.cxx',
    'osl/w32/pipe.cxx',
    'osl/w32/signal.cxx',
  ]
  system_link_args = ['ws2_32.lib', 'Mpr.lib', 'userenv.lib', 'Dbghelp.lib', 'Wer.lib']
elif host_machine.system() == 'darwin'
  system_sources = unix_common + ['osl/unx/osxlocale.cxx', 'osl/unx/system.mm']
  system_link_args = []
else
  system_sources = unix_common + ['osl/unx/system.cxx']
  system_link_args = []
endif

sal_lib = shared_library('sallo',
  'rtl/alloc_arena.cxx',
  'rtl/alloc_cache.cxx',
  'rtl/alloc_fini.cxx',
  'rtl/alloc_global.cxx',
  'rtl/bootstrap.cxx',
  'rtl/byteseq.cxx',
  'rtl/cipher.cxx',
  'rtl/cmdargs.cxx',
  'rtl/crc.cxx',
  'rtl/digest.cxx',
  'rtl/hash.cxx',
  'rtl/locale.cxx',
  'rtl/math.cxx',
  'rtl/random.cxx',
  'rtl/rtl_process.cxx',
  'rtl/strbuf.cxx',
  'rtl/strimp.cxx',
  'rtl/string.cxx',
#  'rtl/strtmpl.cxx',
  'rtl/unload.cxx',
  'rtl/uri.cxx',
  'rtl/ustrbuf.cxx',
  'rtl/ustring.cxx',
  'rtl/uuid.cxx',
  'osl/all/compat.cxx',
  'osl/all/debugbase.cxx',
  'osl/all/filepath.cxx',
  'osl/all/loadmodulerelative.cxx',
  'osl/all/log.cxx',
  'osl/all/signalshared.cxx',
  'osl/all/utility.cxx',
  system_sources,
  'textenc/context.cxx',
  'textenc/convertbig5hkscs.cxx',
  'textenc/converter.cxx',
  'textenc/converteuctw.cxx',
  'textenc/convertgb18030.cxx',
  'textenc/convertisciidevangari.cxx',
  'textenc/convertiso2022cn.cxx',
  'textenc/convertiso2022jp.cxx',
  'textenc/convertiso2022kr.cxx',
  'textenc/convertsimple.cxx',
  'textenc/convertsinglebytetobmpunicode.cxx',
  'textenc/handleundefinedunicodetotextchar.cxx',
  'textenc/tables.cxx',
  'textenc/tcvtbyte.cxx',
  'textenc/tcvtmb.cxx',
  'textenc/tcvtutf7.cxx',
  'textenc/tcvtutf8.cxx',
  'textenc/tencinfo.cxx',
  'textenc/textcvt.cxx',
  'textenc/textenc.cxx',
  'textenc/unichars.cxx',
  include_directories: [main_inc, 'inc'],
  cpp_args: ['-DSRCDIR="@0@"'.format(meson.current_source_dir()),
             '-DRTL_OS="@0@"'.format(rtl_os),
             '-DRTL_ARCH="x86_64"',
             '-DLIBO_INTERNAL_ONLY',
             '-DSAL_DLLIMPLEMENTATION'],
  link_args: system_link_args,
  dependencies: [thread_dep, osx_frameworks_dep, dl_dep],
  gnu_symbol_visibility: 'hidden',
  install: true,
)

if cppunit_dep.found()

  unittester = executable('cppunittester', 'cppunittester/cppunittester.cxx',
    include_directories: [main_inc],
    cpp_args:  ['-DLIBO_INTERNAL_ONLY'],
    link_with: sal_lib,
    dependencies: [cppunit_dep],
  install: true,
    )

  plib = shared_library('osl_test',
    'qa/osl/thread/test_thread.cxx',
    cpp_args:  ['-DLIBO_INTERNAL_ONLY'],
    link_with: sal_lib,
    dependencies: [cppunit_dep, thread_dep],
    include_directories: [main_inc],
    install: true,
  )

  test('sal_test', unittester,
    args: [plib])

  #pc = executable('process_child', 'qa/osl/process/osl_process_child.cxx',
  #  dependencies: []
  #)

  test('osl_security', executable('osl_security', 'qa/osl/security/osl_Security.cxx',
      include_directories: [main_inc],
      cpp_args: ['-DLIBO_INTERNAL_ONLY'],
      link_with: sal_lib,
      dependencies: [cppunit_dep],
      install: true,
    )
  )
endif