summaryrefslogtreecommitdiff
path: root/sal/meson.build
blob: 61ff8f6136ee23b8329e9c077632baa4dcef0082 (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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
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',
  'textenc/converter.cxx',
  'textenc/convertsimple.cxx',
  'textenc/handleundefinedunicodetotextchar.cxx',
  'textenc/tcvtutf8.cxx',
  'textenc/tencinfo.cxx',
  'textenc/textcvt.cxx',
  'textenc/textenc.cxx',
  'textenc/unichars.cxx',
  system_sources,
  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: [
    dl_dep,
    osx_frameworks_dep,
    thread_dep,
  ],
  gnu_symbol_visibility: 'hidden',
  install: true,
)

sal_textenc_lib = shared_library('sal_textenclo',
  'textenc/context.cxx',
  'textenc/convertbig5hkscs.cxx',
  'textenc/converteuctw.cxx',
  'textenc/convertgb18030.cxx',
  'textenc/convertisciidevangari.cxx',
  'textenc/convertiso2022cn.cxx',
  'textenc/convertiso2022jp.cxx',
  'textenc/convertiso2022kr.cxx',
  'textenc/convertsinglebytetobmpunicode.cxx',
  'textenc/tables.cxx',
  'textenc/tcvtbyte.cxx',
  'textenc/tcvtmb.cxx',
  'textenc/tcvtutf7.cxx',
  include_directories: [main_inc, 'inc'],
  cpp_args: ['-DLIBO_INTERNAL_ONLY'],
  link_args: system_link_args,
  link_with: [sal_lib],
  dependencies: [thread_dep],
  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,
    )

  shared_library('test_Module_DLL',
    'qa/osl/module/osl_Module_DLL.cxx',
    include_directories: [main_inc],
    dependencies: [cppunit_dep],
  )

  osltestlib = shared_library('osl_test',
    'qa/osl/condition/osl_Condition.cxx',
    #'qa/osl/file/osl_File.cxx',
    'qa/osl/file/osl_old_test_file.cxx',
    'qa/osl/file/test_cpy_wrt_file.cxx',
    'qa/osl/getsystempathfromfileurl/test-getsystempathfromfileurl.cxx',
    'qa/osl/module/osl_Module.cxx',
    'qa/osl/mutex/osl_Mutex.cxx',
    'qa/osl/pipe/osl_Pipe.cxx',
    'qa/osl/process/osl_process.cxx',
    'qa/osl/process/osl_Thread.cxx',
    'qa/osl/profile/osl_old_testprofile.cxx',
    'qa/osl/setthreadname/test-setthreadname.cxx',
    cpp_args:  ['-DLIBO_INTERNAL_ONLY'],
    link_with: sal_lib,
    dependencies: [cppunit_dep, thread_dep],
    include_directories: [main_inc],
    install: true,
  )

  test('osl_test', unittester,
    args: [osltestlib])

  test_saltypes = shared_library('test_sal_types',
    'qa/sal/test_types.cxx',
    include_directories: [main_inc],
    dependencies: [cppunit_dep],
  )

  test('saltypes', unittester,
    args: [test_saltypes])

  rtltestlib = shared_library('rtl_test',
    'qa/ByteSequence/ByteSequence.cxx',
    'qa/OStringBuffer/rtl_OStringBuffer.cxx',
    'qa/rtl/alloc/rtl_alloc.cxx',
    'qa/rtl/bootstrap/expand.cxx',
    'qa/rtl/cipher/rtl_cipher.cxx',
    'qa/rtl/crc32/rtl_crc32.cxx',
    'qa/rtl/digest/rtl_digest.cxx',
    'qa/rtl/doublelock/rtl_doublelocking.cxx',
    'qa/rtl/locale/rtl_locale.cxx',
    'qa/rtl/math/test-rtl-math.cxx',
    'qa/rtl/oustringbuffer/test_oustringbuffer_appendchar.cxx',
    'qa/rtl/oustringbuffer/test_oustringbuffer_appenduninitialized.cxx',
    'qa/rtl/oustringbuffer/test_oustringbuffer_assign.cxx',
    'qa/rtl/oustringbuffer/test_oustringbuffer_tostring.cxx',
    'qa/rtl/oustringbuffer/test_oustringbuffer_utf32.cxx',
    'qa/rtl/oustring/rtl_OUString2.cxx',
    'qa/rtl/process/rtl_Process.cxx',
    'qa/rtl/random/rtl_random.cxx',
    'qa/rtl/ref/rtl_ref.cxx',
    'qa/rtl/strings/test_strings_replace.cxx',
    'qa/rtl/strings/test_ostring.cxx',
    'qa/rtl/strings/test_ostring_concat.cxx',
    'qa/rtl/strings/test_ostring_stringliterals.cxx',
    'qa/rtl/strings/test_oustring_compare.cxx',
    'qa/rtl/strings/test_oustring_concat.cxx',
    'qa/rtl/strings/test_oustring_convert.cxx',
    'qa/rtl/strings/test_oustring_endswith.cxx',
    'qa/rtl/strings/test_oustring_startswith.cxx',
    'qa/rtl/strings/test_oustring_stringliterals.cxx',
    'qa/rtl/strings/test_strings_toint.cxx',
    'qa/rtl/strings/test_strings_valuex.cxx',
    'qa/rtl/textenc/rtl_tencinfo.cxx',
    'qa/rtl/textenc/rtl_textcvt.cxx',
    'qa/rtl/uri/rtl_Uri.cxx',
    'qa/rtl/uri/rtl_testuri.cxx',
    'qa/rtl/uuid/rtl_Uuid.cxx',
    cpp_args: ['-DLIBO_INTERNAL_ONLY'],
    include_directories: [main_inc, 'qa/inc'],
    link_with: [sal_lib],
    dependencies: [cppunit_dep],
  )

  test('rtl_test', unittester,
    args: [rtltestlib])

  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