|
| 1 | +project('epics-pv-access', 'cpp', version: '7.1.6', license: 'EPICS') |
| 2 | + |
| 3 | +epics_com_dep = dependency('epics-com') |
| 4 | +epics_pv_data_dep = dependency('epics-pv-data') |
| 5 | + |
| 6 | +pva_version_num = configure_file( |
| 7 | + #input: 'src/pv/pvdVersionNum.h@', |
| 8 | + output: 'pvaVersionNum.h', |
| 9 | + configuration: configuration_data({ |
| 10 | + 'EPICS_PVA_MAJOR_VERSION': '7', |
| 11 | + 'EPICS_PVA_MINOR_VERSION': '1', |
| 12 | + 'EPICS_PVA_MAINTENANCE_VERSION': '6', |
| 13 | + 'EPICS_PVA_DEVELOPMENT_FLAG': '1', |
| 14 | + }), |
| 15 | +) |
| 16 | + |
| 17 | +# HACK: this installs 'pvdVersionNum.h' in a 'pv' subdir |
| 18 | +# See: https://github.com/mesonbuild/meson/issues/2320 |
| 19 | +run_command( |
| 20 | + [ |
| 21 | + 'sh', |
| 22 | + '-c', |
| 23 | + 'mkdir @1@/pv; cp @1@/@0@ @1@/pv/'.format( |
| 24 | + pva_version_num, |
| 25 | + meson.current_build_dir() |
| 26 | + ), |
| 27 | + ], |
| 28 | + check: true, |
| 29 | +) |
| 30 | + |
| 31 | +headers = [ |
| 32 | + 'src/client/clientpvt.h', |
| 33 | + 'src/client/pv/monitor.h', |
| 34 | + 'src/client/pv/pvAccess.h', |
| 35 | + 'src/client/pva/client.h', |
| 36 | + |
| 37 | + 'src/mb/pv/pvAccessMB.h', |
| 38 | + |
| 39 | + 'src/pipelineService/pv/pipelineServer.h', |
| 40 | + 'src/pipelineService/pv/pipelineService.h', |
| 41 | + |
| 42 | + 'src/pva/pv/clientFactory.h', |
| 43 | + 'src/pva/pv/pvaConstants.h', |
| 44 | + 'src/pva/pv/pvaDefs.h', |
| 45 | + 'src/pva/pv/pvaVersion.h', |
| 46 | + pva_version_num, |
| 47 | + |
| 48 | + 'src/remote/pv/beaconHandler.h', |
| 49 | + 'src/remote/pv/blockingTCP.h', |
| 50 | + 'src/remote/pv/blockingUDP.h', |
| 51 | + 'src/remote/pv/channelSearchManager.h', |
| 52 | + 'src/remote/pv/codec.h', |
| 53 | + 'src/remote/pv/remote.h', |
| 54 | + 'src/remote/pv/security.h', |
| 55 | + 'src/remote/pv/securityImpl.h', |
| 56 | + 'src/remote/pv/serializationHelper.h', |
| 57 | + 'src/remote/pv/transportRegistry.h', |
| 58 | + |
| 59 | + 'src/remoteClient/pv/clientContextImpl.h', |
| 60 | + |
| 61 | + 'src/rpcClient/pv/rpcClient.h', |
| 62 | + |
| 63 | + 'src/rpcService/pv/rpcServer.h', |
| 64 | + 'src/rpcService/pv/rpcService.h', |
| 65 | + |
| 66 | + 'src/server/pv/baseChannelRequester.h', |
| 67 | + 'src/server/pv/beaconEmitter.h', |
| 68 | + 'src/server/pv/beaconServerStatusProvider.h', |
| 69 | + 'src/server/pv/responseHandlers.h', |
| 70 | + 'src/server/pv/serverChannelImpl.h', |
| 71 | + 'src/server/pv/serverContext.h', |
| 72 | + 'src/server/pv/serverContextImpl.h', |
| 73 | + 'src/server/pva/server.h', |
| 74 | + 'src/server/pva/sharedstate.h', |
| 75 | + 'src/server/sharedstateimpl.h', |
| 76 | + |
| 77 | + 'src/utils/pv/configuration.h', |
| 78 | + 'src/utils/pv/destroyable.h', |
| 79 | + 'src/utils/pv/fairQueue.h', |
| 80 | + 'src/utils/pv/hexDump.h', |
| 81 | + 'src/utils/pv/inetAddressUtil.h', |
| 82 | + 'src/utils/pv/introspectionRegistry.h', |
| 83 | + 'src/utils/pv/likely.h', |
| 84 | + 'src/utils/pv/logger.h', |
| 85 | + 'src/utils/pv/referenceCountingLock.h', |
| 86 | + 'src/utils/pv/requester.h', |
| 87 | + 'src/utils/pv/wildcard.h', |
| 88 | +] |
| 89 | + |
| 90 | +sources = [ |
| 91 | + # TODO: once CA is packaged, as separate libpvAccessCA library |
| 92 | + #'src/ca/caChannel.cpp', |
| 93 | + #'src/ca/caContext.cpp', |
| 94 | + #'src/ca/caProvider.cpp', |
| 95 | + #'src/ca/dbdToPv.cpp', |
| 96 | + #'src/ca/notifierConveyor.cpp', |
| 97 | + |
| 98 | + 'src/client/client.cpp', |
| 99 | + 'src/client/clientGet.cpp', |
| 100 | + 'src/client/clientInfo.cpp', |
| 101 | + 'src/client/clientMonitor.cpp', |
| 102 | + 'src/client/clientPut.cpp', |
| 103 | + 'src/client/clientRPC.cpp', |
| 104 | + 'src/client/clientSync.cpp', |
| 105 | + 'src/client/monitor.cpp', |
| 106 | + 'src/client/pvAccess.cpp', |
| 107 | + |
| 108 | + 'src/factory/ChannelAccessFactory.cpp', |
| 109 | + |
| 110 | + 'src/pipelineService/pipelineServer.cpp', |
| 111 | + 'src/pipelineService/pipelineService.cpp', |
| 112 | + |
| 113 | + 'src/pva/clientFactory.cpp', |
| 114 | + 'src/pva/pvaVersion.cpp', |
| 115 | + |
| 116 | + 'src/remote/abstractResponseHandler.cpp', |
| 117 | + 'src/remote/beaconHandler.cpp', |
| 118 | + 'src/remote/blockingTCPAcceptor.cpp', |
| 119 | + 'src/remote/blockingTCPConnector.cpp', |
| 120 | + 'src/remote/blockingUDPConnector.cpp', |
| 121 | + 'src/remote/blockingUDPTransport.cpp', |
| 122 | + 'src/remote/channelSearchManager.cpp', |
| 123 | + 'src/remote/codec.cpp', |
| 124 | + 'src/remote/security.cpp', |
| 125 | + 'src/remote/serializationHelper.cpp', |
| 126 | + 'src/remote/transportRegistry.cpp', |
| 127 | + |
| 128 | + 'src/remoteClient/clientContextImpl.cpp', |
| 129 | + |
| 130 | + 'src/rpcClient/rpcClient.cpp', |
| 131 | + |
| 132 | + 'src/rpcService/rpcServer.cpp', |
| 133 | + 'src/rpcService/rpcService.cpp', |
| 134 | + |
| 135 | + 'src/server/baseChannelRequester.cpp', |
| 136 | + 'src/server/beaconEmitter.cpp', |
| 137 | + 'src/server/beaconServerStatusProvider.cpp', |
| 138 | + 'src/server/responseHandlers.cpp', |
| 139 | + 'src/server/server.cpp', |
| 140 | + 'src/server/serverChannelImpl.cpp', |
| 141 | + 'src/server/serverContext.cpp', |
| 142 | + 'src/server/sharedstate_channel.cpp', |
| 143 | + 'src/server/sharedstate_put.cpp', |
| 144 | + 'src/server/sharedstate_pv.cpp', |
| 145 | + 'src/server/sharedstate_rpc.cpp', |
| 146 | + |
| 147 | + 'src/utils/configuration.cpp', |
| 148 | + 'src/utils/getgroups.cpp', |
| 149 | + 'src/utils/hexDump.cpp', |
| 150 | + 'src/utils/inetAddressUtil.cpp', |
| 151 | + 'src/utils/introspectionRegistry.cpp', |
| 152 | + 'src/utils/logger.cpp', |
| 153 | + 'src/utils/referenceCountingLock.cpp', |
| 154 | + 'src/utils/requester.cpp', |
| 155 | + 'src/utils/wildcard.cpp', |
| 156 | +] |
| 157 | + |
| 158 | +include_directories = [ |
| 159 | + # For pvaVersionNum.h HACK |
| 160 | + '.', |
| 161 | + |
| 162 | + 'src/client', |
| 163 | + 'src/factory', |
| 164 | + 'src/mb', |
| 165 | + 'src/pipelineService', |
| 166 | + 'src/pva', |
| 167 | + 'src/remote', |
| 168 | + 'src/remoteClient', |
| 169 | + 'src/rpcClient', |
| 170 | + 'src/rpcService', |
| 171 | + 'src/server', |
| 172 | + 'src/utils', |
| 173 | +] |
| 174 | + |
| 175 | +libpv_access = both_libraries( |
| 176 | + 'epics-pv-access', |
| 177 | + sources, |
| 178 | + include_directories: include_directories, |
| 179 | + dependencies: [epics_com_dep, epics_pv_data_dep], |
| 180 | + install: true, |
| 181 | +) |
| 182 | + |
| 183 | +epics_pv_access_dep = declare_dependency( |
| 184 | + include_directories: include_directories, |
| 185 | + link_with: libpv_access, |
| 186 | +) |
| 187 | + |
| 188 | +tests = [ |
| 189 | + ['channel_access_if_test', 'testApp/remote/channelAccessIFTest.cpp'], |
| 190 | + # depends on local iface |
| 191 | + #['pipeline_service_example', 'testApp/remote/pipelineServiceExample.cpp'], |
| 192 | + # depends on local iface |
| 193 | + #['rpc_client_example', 'testApp/remote/rpcClientExample.cpp'], |
| 194 | + # depends on local iface |
| 195 | + #['rpc_service_async_example', 'testApp/remote/rpcServiceAsyncExample.cpp'], |
| 196 | + # depends on local iface |
| 197 | + #['rpc_service_example', 'testApp/remote/rpcServiceExample.cpp'], |
| 198 | + # depends on local iface |
| 199 | + #['rpc_wild_service_example', 'testApp/remote/rpcWildServiceExample.cpp'], |
| 200 | + # depends on config env EPICS_IOC_LOG_FILE_NAME |
| 201 | + #['test_adc_sim', 'testApp/remote/testADCSim.cpp'], |
| 202 | + # depends on local iface |
| 203 | + #['test_channel_connect', 'testApp/remote/testChannelConnect.cpp'], |
| 204 | + ['test_client_factory', 'testApp/remote/testClientFactory.cpp'], |
| 205 | + ['test_codec', 'testApp/remote/testCodec.cpp'], |
| 206 | + # depends on local iface |
| 207 | + #['test_get_performance', 'testApp/remote/testGetPerformance.cpp'], |
| 208 | + # depends on local iface |
| 209 | + #['test_monitor_performance', 'testApp/remote/testMonitorPerformance.cpp'], |
| 210 | + # TODO: doesn't compile? |
| 211 | + #['test_nt_image', 'testApp/remote/testNTImage.cpp'], |
| 212 | + ['test_raii', 'testApp/remote/testRAII.cpp'], |
| 213 | + ['test_rpc', 'testApp/remote/testRPC.cpp'], |
| 214 | + # depends on local iface |
| 215 | + #['test_remote_client_impl', 'testApp/remote/testRemoteClientImpl.cpp'], |
| 216 | + # depends on local iface |
| 217 | + #['test_server', 'testApp/remote/testServer.cpp'], |
| 218 | + # depends on local iface |
| 219 | + #['test_server_context', 'testApp/remote/testServerContext.cpp'], |
| 220 | + ['testmonitorfifo', 'testApp/remote/testmonitorfifo.cpp'], |
| 221 | + ['testsharedstate', 'testApp/remote/testsharedstate.cpp'], |
| 222 | + ['configuration_test', 'testApp/utils/configurationTest.cpp'], |
| 223 | + ['showauth', 'testApp/utils/showauth.cpp'], |
| 224 | + ['test_atomic_boolean', 'testApp/utils/testAtomicBoolean.cpp'], |
| 225 | + ['test_fair_queue', 'testApp/utils/testFairQueue.cpp'], |
| 226 | + ['test_hex_dump', 'testApp/utils/testHexDump.cpp'], |
| 227 | + # depends on local iface |
| 228 | + #['test_inet_address_utils', 'testApp/utils/testInetAddressUtils.cpp'], |
| 229 | + ['test_wildcard', 'testApp/utils/testWildcard.cpp'], |
| 230 | +] |
| 231 | + |
| 232 | +foreach t : tests |
| 233 | + exe = executable( |
| 234 | + t[0], |
| 235 | + t[1], |
| 236 | + dependencies: [epics_com_dep, epics_pv_data_dep, epics_pv_access_dep] |
| 237 | + ) |
| 238 | + test(t[0], exe, is_parallel: true) |
| 239 | +endforeach |
| 240 | + |
| 241 | +pkgconfig = import('pkgconfig') |
| 242 | +pkgconfig.generate(libpv_access) |
| 243 | + |
| 244 | +install_headers(headers, subdir: 'pv') |
| 245 | + |
| 246 | +subdir('src/ca') |
| 247 | +subdir('src/ioc') |
| 248 | + |
| 249 | +subdir('pvtoolsSrc') |
0 commit comments