| # Copyright 2021 The ChromiumOS Authors |
| # Use of this source code is governed by a BSD - style license that can be |
| # found in the LICENSE file. |
| |
| import("//common-mk/pkg_config.gni") |
| import("//common-mk/proto_library.gni") |
| |
| group("all") { |
| deps = [ |
| ":libmissiveclient_pc", |
| ":missiveclientlib", |
| ":missived", |
| ] |
| if (use.test) { |
| deps += [ ":missived_testrunner" ] |
| } |
| } |
| |
| pkg_config("target_defaults") { |
| pkg_deps = [ |
| "dbus-1", |
| "libbrillo", |
| "libchrome", |
| |
| # system_api depends on protobuf(or protobuf - lite).It must appear |
| # before protobuf here or the linker flags won't be in the right |
| # order. |
| "system_api", |
| ] |
| if (use.fuzzer) { |
| pkg_deps += [ "protobuf" ] |
| } else { |
| pkg_deps += [ "protobuf-lite" ] |
| } |
| } |
| |
| generate_pkg_config("libmissiveclient_pc") { |
| name = "libmissiveclient" |
| output_name = "libmissiveclient" |
| description = "missive client library" |
| version = libbase_ver |
| requires = [] |
| requires_private = [ |
| "dbus-1", |
| "libbrillo", |
| "libchrome", |
| ] |
| defines = [ "USE_RTTI_FOR_TYPE_TAGS" ] |
| libs = [ |
| "-lmissiveclientlib", |
| "-lmissiveprotohealth", |
| "-lmissiveprotosecurityevents", |
| "-lmissiveprotosecurityxdrevents", |
| "-lmissiveprotostatus", |
| "-lmissiveprotorecordconstants", |
| "-lmissiveprotorecord", |
| "-lmissiveprotointerface", |
| ] |
| cflags = [ "-I/usr/include/libmissiveclient" ] |
| } |
| |
| # Client library for use by other daemons to call missived |
| static_library("missiveclientlib") { |
| sources = [ |
| "client/dm_token_retriever.h", |
| "client/empty_dm_token_retriever.cc", |
| "client/empty_dm_token_retriever.h", |
| "client/missive_client.cc", |
| "client/missive_client.h", |
| "client/missive_dbus_constants.h", |
| "client/report_queue.cc", |
| "client/report_queue.h", |
| "client/report_queue_configuration.cc", |
| "client/report_queue_configuration.h", |
| "client/report_queue_factory.cc", |
| "client/report_queue_factory.h", |
| "client/report_queue_impl.cc", |
| "client/report_queue_impl.h", |
| "client/report_queue_nonchrome_provider.cc", |
| "client/report_queue_provider.cc", |
| "client/report_queue_provider.h", |
| "storage/missive_storage_module.cc", |
| "storage/missive_storage_module.h", |
| "storage/missive_storage_module_delegate_impl.cc", |
| "storage/missive_storage_module_delegate_impl.h", |
| "storage/storage_module_interface.cc", |
| "storage/storage_module_interface.h", |
| "util/disconnectable_client.cc", |
| "util/disconnectable_client.h", |
| "util/status.cc", |
| "util/status.h", |
| "util/statusor.cc", |
| "util/statusor.h", |
| ] |
| configs += [ ":target_defaults" ] |
| |
| # Make the library into a standalone one. |
| configs -= [ "//common-mk:use_thin_archive" ] |
| configs += [ "//common-mk:nouse_thin_archive" ] |
| |
| public_deps = [ |
| "//missive/proto:libmissiveprotohealth", |
| "//missive/proto:libmissiveprotointerface", |
| "//missive/proto:libmissiveprotorecord", |
| "//missive/proto:libmissiveprotorecordconstants", |
| "//missive/proto:libmissiveprotosecurityevents", |
| "//missive/proto:libmissiveprotosecurityxdrevents", |
| ] |
| } |
| |
| executable("missived") { |
| sources = [ "main.cc" ] |
| configs += [ ":target_defaults" ] |
| deps = [ |
| "//missive/daemon:missive_daemon", |
| "//missive/dbus:dbus_adaptor", |
| "//missive/missive:missive_args", |
| "//missive/missive:missive_impl", |
| "//missive/missive:missive_service", |
| ] |
| } |
| |
| if (use.test) { |
| pkg_config("target_test") { |
| pkg_deps = [ |
| "libbrillo-test", |
| "libchrome-test", |
| "openssl", |
| ] |
| } |
| |
| executable("missived_testrunner") { |
| sources = [ |
| "client/empty_dm_token_retriever_test.cc", |
| "client/report_queue_configuration_test.cc", |
| "client/report_queue_factory_test.cc", |
| "client/report_queue_impl_test.cc", |
| "client/report_queue_provider_test.cc", |
| "client/report_queue_provider_test_helper.cc", |
| "client/report_queue_provider_test_helper.h", |
| "client/report_queue_test.cc", |
| "compression/compression_module_test.cc", |
| "dbus/upload_client_impl_test.cc", |
| "resources/enqueuing_record_tallier_test.cc", |
| "resources/resource_interface_test.cc", |
| "scheduler/enqueue_job_test.cc", |
| "scheduler/scheduler_test.cc", |
| "scheduler/upload_job_test.cc", |
| "storage/storage_queue_stress_test.cc", |
| "storage/storage_queue_test.cc", |
| "storage/storage_test.cc", |
| "util/disconnectable_client_test.cc", |
| "util/file_test.cc", |
| "util/status_macros_test.cc", |
| "util/status_test.cc", |
| "util/statusor_test.cc", |
| "util/time_test.cc", |
| ] |
| |
| configs += [ |
| ":target_defaults", |
| ":target_test", |
| "//common-mk:test", |
| ] |
| |
| deps = [ |
| "//common-mk/testrunner", |
| "//missive/analytics:unit_tests", |
| "//missive/client:client_test_support", |
| "//missive/compression:compression_module", |
| "//missive/compression:compression_test_support", |
| "//missive/daemon:unit_tests", |
| "//missive/dbus:test_support", |
| "//missive/encryption:encryption_test_support", |
| "//missive/encryption:unit_tests", |
| "//missive/missive:missive_args", |
| "//missive/missive:unit_tests", |
| "//missive/resources:resource_interface", |
| "//missive/scheduler", |
| "//missive/scheduler:enqueue_job", |
| "//missive/scheduler:upload_job", |
| "//missive/storage:storage_test_support", |
| "//missive/storage:storage_uploader_interface", |
| "//missive/util:file", |
| "//missive/util:status", |
| "//missive/util:test_callbacks_support", |
| "//missive/util:time", |
| ] |
| } |
| } |