blob: d51808b44506456ed052f360806c4f39b80b9a22 [file] [log] [blame]
# Copyright 2019 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/pkg_config.gni")
group("all") {
deps = [
":glib_bridge",
":glib_bridge-static",
":libglib_bridge",
]
if (use.test) {
deps += [ ":glib_bridge_test_runner" ]
}
}
pkg_config("target_defaults") {
# NOSORT
pkg_deps = [
"glib-2.0",
"gthread-2.0",
"libchrome",
]
}
static_library("glib_bridge-static") {
configs += [ ":target_defaults" ]
sources = [
"glib_bridge.cc",
"glib_logger.cc",
]
}
shared_library("glib_bridge") {
configs += [ ":target_defaults" ]
sources = [
"glib_bridge.cc",
"glib_logger.cc",
]
}
generate_pkg_config("libglib_bridge") {
version = getenv("PV")
description = "glib-bridge shared library"
cflags = [ "-I/usr/include/glib-bridge" ]
libs = [ "-lglib_bridge" ]
}
if (use.test) {
executable("glib_bridge_test_runner") {
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",
]
sources = [
"glib_bridge_test.cc",
"glib_structured_logger_test.cc",
"glib_unstructured_logger_test.cc",
]
deps = [
":glib_bridge-static",
"//common-mk/testrunner",
]
pkg_deps = [
"gio-2.0",
"gio-unix-2.0",
]
}
}