blob: a9b5792df31b02bb6d4d2f367e32df0de3684105 [file] [log] [blame]
# Copyright 2018 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//common-mk/generate-dbus-adaptors.gni")
import("//common-mk/pkg_config.gni")
group("all") {
deps = [
":hermes",
":libhermes",
]
if (use.test) {
deps += [ ":hermes_test" ]
}
}
pkg_config("target_defaults") {
pkg_deps = [
"google-lpa",
"jsoncpp",
"libbrillo",
"libchrome",
"openssl",
"protobuf-lite",
"re2",
"system_api",
]
libs = [ "qrtr" ]
}
generate_dbus_adaptors("hermes_adaptors") {
dbus_service_config = "dbus_bindings/dbus-service-config.json"
dbus_adaptors_out_dir = "include/hermes/dbus_bindings"
sources = [
"dbus_bindings/org.chromium.Hermes.Euicc.xml",
"dbus_bindings/org.chromium.Hermes.Manager.xml",
"dbus_bindings/org.chromium.Hermes.Profile.xml",
]
}
static_library("libhermes") {
configs += [ ":target_defaults" ]
sources = [
"adaptor_factory.cc",
"apdu.cc",
"context.cc",
"daemon.cc",
"dms_cmd.cc",
"euicc.cc",
"euicc_dbus_adaptor.cc",
"executor.cc",
"lpa_util.cc",
"manager.cc",
"manager_dbus_adaptor.cc",
"modem_qrtr.cc",
"profile.cc",
"sgp_22.cc",
"smdp.cc",
"smds.cc",
"socket_qrtr.cc",
"uim_cmd.cc",
]
deps = [ ":hermes_adaptors" ]
}
executable("hermes") {
configs += [ ":target_defaults" ]
sources = [ "main.cc" ]
deps = [ ":libhermes" ]
}
if (use.test) {
pkg_config("test_config") {
pkg_deps = [ "libchrome-test" ]
}
executable("hermes_test") {
configs += [
# //common-mk:test should be at the top. crbug.com/887845
# TODO(crbug.com/887845): Remove this note after library order issue is resolved.
"//common-mk:test",
":target_defaults",
":test_config",
]
sources = [
"apdu_test.cc",
"modem_qrtr_test.cc",
]
deps = [
":libhermes",
"//common-mk/testrunner",
]
}
}