forked from Beckhoff/ADS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
64 lines (56 loc) · 1.29 KB
/
meson.build
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
project('AdsLib', 'cpp',
version : '0.1',
default_options : [
'warning_level=3',
]
)
common_files = files([
'AdsLib/AdsDef.cpp',
'AdsLib/AdsDevice.cpp',
'AdsLib/AdsFile.cpp',
'AdsLib/Log.cpp',
'AdsLib/Sockets.cpp',
'AdsLib/Frame.cpp',
])
router_files = files([
'AdsLib/standalone/AdsLib.cpp',
'AdsLib/standalone/AmsConnection.cpp',
'AdsLib/standalone/AmsNetId.cpp',
'AdsLib/standalone/AmsPort.cpp',
'AdsLib/standalone/AmsRouter.cpp',
'AdsLib/standalone/NotificationDispatcher.cpp',
])
inc = include_directories([
'AdsLib',
'tools',
])
libs = [
meson.get_compiler('cpp').find_library('ws2_32', required: false),
dependency('threads'),
]
adslib = static_library('AdsLib',
[common_files, router_files],
include_directories: inc,
)
adslibtest = executable('AdsLibTest',
'AdsLibTest/main.cpp',
include_directories: inc,
dependencies: libs,
link_with: adslib,
)
adslibooitest = executable('AdsLibOOITest',
'AdsLibOOITest/main.cpp',
include_directories: inc,
dependencies: libs,
link_with: adslib,
)
if get_option('tcadsdll_include') != ''
tcadslib = static_library('TcAdsLib',
[common_files, 'AdsLib/TwinCAT/AdsLib.cpp'],
cpp_args: '-DUSE_TWINCAT_ROUTER',
include_directories: [
get_option('tcadsdll_include'),
inc,
],
)
endif