diff --git a/cc/local_include_prefix.bzl b/cc/local_include_prefix.bzl new file mode 100644 index 00000000..68c97877 --- /dev/null +++ b/cc/local_include_prefix.bzl @@ -0,0 +1,14 @@ +# Copyright (C) 2022 Swift Navigation Inc. +# Contact: Swift Navigation +# +# This source is subject to the license found in the file 'LICENSE' which must +# be be distributed together with this source. All other rights reserved. +# +# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, +# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. + +def local_include_prefix(): + root = Label(native.repository_name() + "//:WORKSPACE").workspace_root or "." + package = native.package_name() + return root + "/" + package + "/"