| # Copyright 2023 The Cobalt Authors. All Rights Reserved. |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| declare_args() { |
| starboard_target_type = "" |
| } |
| |
| if (starboard_target_type == "") { |
| if (sb_is_modular && !sb_is_evergreen) { |
| starboard_target_type = "shared_library" |
| } else { |
| starboard_target_type = "group" |
| } |
| } |
| |
| template("starboard_platform_target") { |
| target(starboard_target_type, target_name) { |
| forward_variables_from(invoker, [ "extra_configs" ]) |
| |
| if (defined(invoker.extra_configs)) { |
| configs += extra_configs |
| } |
| if (starboard_target_type == "shared_library") { |
| build_loader = false |
| } |
| public_deps = [ |
| "//starboard/client_porting/cwrappers", |
| "//starboard/client_porting/eztime", |
| "//starboard/common", |
| "//starboard/egl_and_gles", |
| ] |
| if (sb_is_evergreen_compatible) { |
| public_deps += [ "//third_party/crashpad/wrapper" ] |
| } else { |
| public_deps += [ "//third_party/crashpad/wrapper:wrapper_stub" ] |
| } |
| if (!sb_is_evergreen) { |
| public_deps += [ "//$starboard_path:starboard_platform" ] |
| } |
| } |
| } |