blob: 0833f7a15525f9146933f2a47cea66b27d4c9e25 [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 = [
"gio-2.0",
"gio-unix-2.0",
"glib-2.0",
"google-lpa",
"gthread-2.0",
"jsoncpp",
"libbrillo",
"libchrome",
"libglib_bridge",
"openssl",
"protobuf-lite",
"re2",
"system_api",
]
if (use.qrtr) {
libs = [ "qrtr" ]
} else {
libs = [ "mbim-glib" ]
}
}
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") {
sources = [
"adaptor_factory.cc",
"apdu.cc",
"context.cc",
"daemon.cc",
"euicc.cc",
"euicc_dbus_adaptor.cc",
"executor.cc",
"hermes_common.cc",
"lpa_util.cc",
"manager.cc",
"manager_dbus_adaptor.cc",
"profile.cc",
"sgp_22.cc",
"smdp.cc",
"smds.cc",
]
if (use.qrtr) {
sources += [
"dms_cmd.cc",
"modem_qrtr.cc",
"socket_qrtr.cc",
"uim_cmd.cc",
]
} else {
sources += [ "modem_mbim.cc" ]
}
configs += [ ":target_defaults" ]
defines = [ "USE_QRTR=${use.qrtr}" ]
deps = [ ":hermes_adaptors" ]
}
executable("hermes") {
sources = [ "main.cc" ]
configs += [ ":target_defaults" ]
deps = [ ":libhermes" ]
}
if (use.test) {
pkg_config("test_config") {
pkg_deps = [ "libchrome-test" ]
}
executable("hermes_test") {
sources = [ "apdu_test.cc" ]
if (use.qrtr) {
sources += [ "modem_qrtr_test.cc" ]
}
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",
]
deps = [
":libhermes",
"//common-mk/testrunner",
]
}
}