# Embed the Statum client scripts (js/statum.js and js/statum-worker.js) into the # library as precompressed ConstantStatumResource classes, served by default at # /_statum/resource/statum.js and /_statum/resource/statum-worker.js. Generated # at build time by the in-tree statum-mkres tool — no installed tool required. client_script = custom_target('statum-client-script', input: files('../js/statum.js'), output: 'ClientScript.vala', command: [statum_mkres, '-o', '@OUTPUT@', '-n', 'statum.js', '--class-name', 'ClientScript', '--ns', 'Statum', '-c', 'application/javascript', '@INPUT@'] ) client_worker = custom_target('statum-client-worker', input: files('../js/statum-worker.js'), output: 'ClientWorker.vala', command: [statum_mkres, '-o', '@OUTPUT@', '-n', 'statum-worker.js', '--class-name', 'ClientWorker', '--ns', 'Statum', '-c', 'application/javascript', '@INPUT@'] ) sources = files( 'Statum.vala', 'StatumResource.vala', 'HeldSlot.vala', 'HeldSlotResolver.vala', 'ChannelService.vala', 'StatumRequest.vala', 'StatumDirectives.vala', 'StatumHandlers.vala', 'StatumPage.vala', 'EntrypointRouteTable.vala', 'ChannelEndpoint.vala', 'ChannelGatewayEndpoint.vala', 'ConnectionTracker.vala', 'AuthorizationPolicy.vala', 'ChannelSubscriptionEndpoint.vala', 'SlotPostEndpoint.vala', 'EntrypointEndpoint.vala', 'ResourceEndpoint.vala', 'ActionRegistry.vala', 'ActionEndpoint.vala', 'DirectiveBuilder.vala', 'GObjectMapping.vala', 'TopicSystem.vala', 'Model/Scope.vala', 'Model/SlotDto.vala', 'Model/FrameDto.vala', 'Model/SnapshotDto.vala', 'Model/ActionDto.vala', 'Model/DirectiveDto.vala', 'Cryptography/SigningProvider.vala', 'Cryptography/EncryptionProvider.vala', 'StateService.vala', 'State.vala', 'Slot.vala' ) # The API version rides every artifact name (libstatum-0.1.so, # statum-0.1.vapi, ...); the project version is the release version and # only reaches the pkg-config Version: field (usm checks it against the # manifest version). api_version = '0.1' release_version = meson.project_version() libstatum = shared_library('statum-@0@'.format(api_version), sources, client_script, client_worker, dependencies: [ glib_dep, gobject_dep, gio_dep, gee_dep, invercargill_dep, invercargill_json_dep, json_glib_dep, libxml_dep, inversion_dep, astralis_dep, locksmith_dep, invercargill_sql_dep, sqlite_dep, invercargill_sql_inversion_dep, ], install: true, vala_gir: 'statum-@0@.gir'.format(api_version), install_dir: [true, true, true, true] ) pkg = import('pkgconfig') pkg.generate(libstatum, version: release_version, name: 'statum-@0@'.format(api_version)) statum_dep = declare_dependency( link_with: libstatum, include_directories: include_directories('.'), dependencies: [ glib_dep, gobject_dep, gio_dep, gee_dep, invercargill_dep, invercargill_json_dep, json_glib_dep, libxml_dep, inversion_dep, astralis_dep, locksmith_dep, ] )