[googletest] Reference SDK parts when building with the SDK.
Change-Id: I8deecb7c580e100f49c80c86554170b306d01dd0
diff --git a/BUILD.gn b/BUILD.gn
index f15ef60..50d1ab2 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/fuchsia/sdk.gni")
+
config("gtest_private_config") {
visibility = [ ":*" ]
include_dirs = [ "googletest" ]
@@ -14,8 +16,8 @@
static_library("gtest") {
testonly = true
public = [
- "googletest/include/gtest/gtest.h",
"googletest/include/gtest/gtest-spi.h",
+ "googletest/include/gtest/gtest.h",
]
sources = [
"googletest/include/gtest/gtest-death-test.h",
@@ -56,10 +58,17 @@
configs += [ ":gtest_private_config" ]
if (is_fuchsia) {
- deps = [
- "//zircon/public/lib/fdio",
- "//zircon/public/lib/zx",
- ]
+ if (using_fuchsia_sdk) {
+ deps = [
+ "$fuchsia_sdk_root/pkg:fdio",
+ "$fuchsia_sdk_root/pkg:zx",
+ ]
+ } else {
+ deps = [
+ "//zircon/public/lib/fdio",
+ "//zircon/public/lib/zx",
+ ]
+ }
}
}