Skip to content

Commit ae11522

Browse files
committed
meson.build: Add declare_dependency
1 parent b59e538 commit ae11522

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

src/meson.build

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ lt_revision = 0
2222
lt_age = 1
2323
lt_version = '@0@.@1@.@2@'.format(lt_current, lt_age, lt_revision)
2424

25-
modbuslib = library('modbus', sources,
26-
version: lt_version,
27-
soversion: lt_current,
28-
include_directories : include_directories('..'),
29-
install : true)
25+
libmodbus = shared_library('modbus', sources,
26+
version: lt_version,
27+
soversion: lt_current,
28+
include_directories : include_directories('..'),
29+
install : true)
30+
31+
libmodbus_dep = declare_dependency(link_with : libmodbus)

tests/meson.build

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,43 +6,43 @@ incdir = include_directories('../src')
66

77
bandwidth_server_one = executable(
88
'bandwidth-server-one', 'bandwidth-server-one.c',
9-
link_with : modbuslib,
9+
link_with : libmodbus,
1010
include_directories : incdir
1111
)
1212

1313
bandwidth_server_many_up = executable(
1414
'bandwidth-server-many-up', 'bandwidth-server-many-up.c',
15-
link_with : modbuslib,
15+
link_with : libmodbus,
1616
include_directories : incdir
1717
)
1818

1919
bandwidth_client = executable(
2020
'bandwidth-client', 'bandwidth-client.c',
21-
link_with : modbuslib,
21+
link_with : libmodbus,
2222
include_directories : incdir
2323
)
2424

2525
random_test_server = executable(
2626
'random-test-server', 'random-test-server.c',
27-
link_with : modbuslib,
27+
link_with : libmodbus,
2828
include_directories : incdir
2929
)
3030

3131
random_test_client = executable(
3232
'random-test-client', 'random-test-client.c',
33-
link_with : modbuslib,
33+
link_with : libmodbus,
3434
include_directories : incdir
3535
)
3636

3737
unit_test_server = executable(
3838
'unit-test-server', 'unit-test-server.c',
39-
link_with : modbuslib,
39+
link_with : libmodbus,
4040
include_directories : incdir
4141
)
4242

4343
unit_test_client = executable(
4444
'unit-test-client', 'unit-test-client.c',
45-
link_with : modbuslib,
45+
link_with : libmodbus,
4646
include_directories : incdir
4747
)
4848

0 commit comments

Comments
 (0)