Skip to content

Commit eee2975

Browse files
authored
Merge pull request #2 from gridpoint-com/meson-support
Add .github/workflows/meson-build.yml
2 parents 74034dc + ae11522 commit eee2975

File tree

3 files changed

+32
-12
lines changed

3 files changed

+32
-12
lines changed

.github/workflows/meson-build.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Meson build libmodbus
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
pull_request:
7+
branches: ["master"]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-python@v1
16+
- uses: BSFishy/[email protected]
17+
with:
18+
action: test

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)