aboutsummaryrefslogtreecommitdiff
path: root/test cases/unit/17 prebuilt shared/meson.build
blob: 7badcb746ce99ab69223ef43d2a45bccd031db29 (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
project('prebuilt shared library', 'c')

search_dir = get_option('search_dir')
if search_dir == 'auto'
  search_dir = meson.current_source_dir()
endif

cc = meson.get_compiler('c')
shlib = cc.find_library('alexandria', dirs : search_dir)

exe = executable('patron', 'patron.c', dependencies : shlib)
test('visitation', exe)

d = declare_dependency(dependencies : shlib)

exe2 = executable('another_visitor', 'another_visitor.c',
  dependencies : d)
test('another', exe2)

stlib = static_library(
  'rejected',
  'rejected.c',
  dependencies : shlib,
)

rejected = executable(
  'rejected',
  'rejected_main.c',
  link_with : stlib,
)
test('rejected', rejected)

rejected_whole = executable(
  'rejected_whole',
  'rejected_main.c',
  link_whole : stlib,
)
test('rejected (whole archive)', rejected_whole)