Index: mojo/public/mojo_sdk.gni |
diff --git a/third_party/mojo/src/mojo/public/mojo_sdk.gni b/mojo/public/mojo_sdk.gni |
similarity index 78% |
rename from third_party/mojo/src/mojo/public/mojo_sdk.gni |
rename to mojo/public/mojo_sdk.gni |
index 408c14a16baced1a8ba2e4581cfa473e1d1b9728..1c5d9d38627f5422802557d2674859912db6e678 100644 |
--- a/third_party/mojo/src/mojo/public/mojo_sdk.gni |
+++ b/mojo/public/mojo_sdk.gni |
@@ -2,12 +2,6 @@ |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
-# The absolute path to the directory containing the mojo public SDK (i.e., the |
-# directory containing mojo/public). The build files within the Mojo public |
-# SDK use this variable to allow themselves to be parameterized by the location |
-# of the public SDK within a client repo. |
-mojo_root = get_path_info("../..", "abspath") |
- |
# Takes as input a "source_set" that includes dependencies that are relative to |
# the parent directory of the Mojo public SDK (given in |mojo_sdk_deps|). |
# Generates a source_set that has the mojo_sdk_deps added as ordinary deps |
@@ -49,12 +43,12 @@ template("mojo_sdk_source_set") { |
} else { |
visibility = [ "*" ] |
} |
- if (defined(invoker.mojo_sdk_visibility)) { |
- foreach(sdk_target, invoker.mojo_sdk_visibility) { |
- # Check that the SDK target was not mistakenly given as an absolute |
+ if (defined(invoker.mojo_edk_visibility)) { |
+ foreach(edk_target, invoker.mojo_edk_visibility) { |
+ # Check that the EDK target was not mistakenly given as an absolute |
# path. |
- assert(get_path_info(sdk_target, "abspath") != sdk_target) |
- visibility += [ rebase_path(sdk_target, ".", mojo_root) ] |
+ assert(get_path_info(edk_target, "abspath") != edk_target) |
+ visibility += [ rebase_path(edk_target, ".", "//third_party/mojo/src") ] |
} |
} |
@@ -106,11 +100,18 @@ template("mojo_sdk_source_set") { |
public_deps += [ dep ] |
} |
} |
+ if (defined(invoker.mojo_edk_public_deps)) { |
+ foreach(edk_dep, invoker.mojo_edk_public_deps) { |
+ # Check that the EDK dep was not mistakenly given as an absolute path. |
+ assert(get_path_info(edk_dep, "abspath") != edk_dep) |
+ public_deps += [ rebase_path(edk_dep, ".", "//third_party/mojo/src") ] |
+ } |
+ } |
if (defined(invoker.mojo_sdk_public_deps)) { |
foreach(sdk_dep, invoker.mojo_sdk_public_deps) { |
# Check that the SDK dep was not mistakenly given as an absolute path. |
assert(get_path_info(sdk_dep, "abspath") != sdk_dep) |
- public_deps += [ rebase_path(sdk_dep, ".", mojo_root) ] |
+ public_deps += [ rebase_path(sdk_dep, ".", "//") ] |
} |
} |
@@ -129,11 +130,18 @@ template("mojo_sdk_source_set") { |
deps += [ dep ] |
} |
} |
+ if (defined(invoker.mojo_edk_deps)) { |
+ foreach(edk_dep, invoker.mojo_edk_deps) { |
+ # Check that the EDK dep was not mistakenly given as an absolute path. |
+ assert(get_path_info(edk_dep, "abspath") != edk_dep) |
+ deps += [ rebase_path(edk_dep, ".", "//third_party/mojo/src") ] |
+ } |
+ } |
if (defined(invoker.mojo_sdk_deps)) { |
foreach(sdk_dep, invoker.mojo_sdk_deps) { |
# Check that the SDK dep was not mistakenly given as an absolute path. |
assert(get_path_info(sdk_dep, "abspath") != sdk_dep) |
- deps += [ rebase_path(sdk_dep, ".", mojo_root) ] |
+ deps += [ rebase_path(sdk_dep, ".", "//") ] |
} |
} |