diff --git a/src/meson.build b/src/meson.build index 984f1e6c2..1eb765f42 100644 --- a/src/meson.build +++ b/src/meson.build @@ -22,8 +22,12 @@ 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) + +incdir = include_directories('../src') +libmodbus_dep = declare_dependency(link_with : libmodbus, + include_directories: incdir)) diff --git a/tests/meson.build b/tests/meson.build index fb30f49ed..d17d5bc0c 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -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 )