Skip to content

Commit

Permalink
meson.build: Add declare_dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
ringlej committed Nov 8, 2022
1 parent b59e538 commit ae11522
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
12 changes: 7 additions & 5 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ lt_revision = 0
lt_age = 1
lt_version = '@0@.@1@.@2@'.format(lt_current, lt_age, lt_revision)

modbuslib = library('modbus', sources,
version: lt_version,
soversion: lt_current,
include_directories : include_directories('..'),
install : true)
libmodbus = shared_library('modbus', sources,
version: lt_version,
soversion: lt_current,
include_directories : include_directories('..'),
install : true)

libmodbus_dep = declare_dependency(link_with : libmodbus)
14 changes: 7 additions & 7 deletions tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,43 @@ incdir = include_directories('../src')

bandwidth_server_one = executable(
'bandwidth-server-one', 'bandwidth-server-one.c',
link_with : modbuslib,
link_with : libmodbus,
include_directories : incdir
)

bandwidth_server_many_up = executable(
'bandwidth-server-many-up', 'bandwidth-server-many-up.c',
link_with : modbuslib,
link_with : libmodbus,
include_directories : incdir
)

bandwidth_client = executable(
'bandwidth-client', 'bandwidth-client.c',
link_with : modbuslib,
link_with : libmodbus,
include_directories : incdir
)

random_test_server = executable(
'random-test-server', 'random-test-server.c',
link_with : modbuslib,
link_with : libmodbus,
include_directories : incdir
)

random_test_client = executable(
'random-test-client', 'random-test-client.c',
link_with : modbuslib,
link_with : libmodbus,
include_directories : incdir
)

unit_test_server = executable(
'unit-test-server', 'unit-test-server.c',
link_with : modbuslib,
link_with : libmodbus,
include_directories : incdir
)

unit_test_client = executable(
'unit-test-client', 'unit-test-client.c',
link_with : modbuslib,
link_with : libmodbus,
include_directories : incdir
)

Expand Down

0 comments on commit ae11522

Please sign in to comment.