blob: 7c7ea8c13b45ba6b9b761f5f613ac7303cb21a3b [file] [log] [blame]
# Copyright 2019 The Fuchsia 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("//third_party/fuchsia-sdk/build/component.gni")
import("//third_party/fuchsia-sdk/build/package.gni")
import("//third_party/fuchsia-sdk/build/test.gni")
# default group
group("hello_world") {
public_deps = [
":hello_world_package",
]
}
# tests group
group("tests") {
testonly = true
public_deps = [
":hello_world_test",
":hello_world_test_package",
]
}
# Executable using both a static and shared lib.
executable("hello_bin") {
output_name = "hello_world"
sources = [ "hello.cc" ]
deps = [
":hello_shared",
":hello_static",
]
}
shared_library("hello_shared") {
sources = [
"hello_shared.cc",
"hello_shared.h",
]
defines = [ "HELLO_SHARED_IMPLEMENTATION" ]
}
static_library("hello_static") {
sources = [
"hello_static.cc",
"hello_static.h",
]
}
# Fuchsia components and packages
fuchsia_component("component") {
manifest_output_name = "hello_world"
manifest = "meta/hello_world.cml"
data_deps = [ ":hello_bin" ]
}
fuchsia_package("hello_world_package") {
package_name = "hello_world"
deps = [ ":component" ]
}
fuchsia_test("hello_world_test") {
manifest = "meta/hello_world_test.cml"
sources = [ "test/hello_test.cc" ]
deps = [
"//third_party/googletest:gtest",
"//third_party/googletest:gtest_main",
]
}