| # Copyright 2017 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. |
| |
| # Import platform-specific defaults |
| import("//$starboard_path/configuration.gni") |
| |
| # Starboard variables. |
| |
| # Enables embedding Starboard as a shared library within another app. This |
| # requires a 'lib' starboard implementation for the corresponding platform. |
| if (!defined(sb_enable_lib)) { |
| sb_enable_lib = false |
| } |
| |
| # Directory path to static contents. |
| if (!defined(sb_static_contents_output_base_dir)) { |
| sb_static_contents_output_base_dir = "$root_out_dir/content" |
| } |
| |
| # Directory path to static contents' data. |
| if (!defined(sb_static_contents_output_data_dir)) { |
| sb_static_contents_output_data_dir = "$root_out_dir/content/data" |
| } |
| |
| # Halt execution on failure to allocate memory. |
| if (!defined(abort_on_allocation_failure)) { |
| abort_on_allocation_failure = true |
| } |
| |
| # The source of EGL and GLES headers and libraries. |
| # Valid values (case and everything sensitive!): |
| # "none" - No EGL + GLES implementation is available on this platform. |
| # "system_gles3" - Use the system implementation of EGL + GLES3. The |
| # headers and libraries must be on the system include and |
| # link paths. |
| # "system_gles2" - Use the system implementation of EGL + GLES2. The |
| # headers and libraries must be on the system include and |
| # link paths. |
| # "glimp" - Cobalt's own EGL + GLES2 implementation. This requires a |
| # valid Glimp implementation for the platform. |
| # "angle" - A DirectX-to-OpenGL adaptation layer. This requires a valid |
| # ANGLE implementation for the platform. |
| # Choosing an unsupported value will result in a GN error: |
| # "Unresolved dependencies: //cobalt/renderer/egl_and_gles:<gl_type>" |
| if (!defined(gl_type)) { |
| gl_type = "system_gles2" |
| } |
| |
| # TODO: Temporary indicator for Tizen - should eventually move to feature defines. |
| if (!defined(is_tizen_os)) { |
| is_tizen_os = false |
| } |
| |
| # The event polling mechanism available on this platform to support libevent. |
| # Platforms may redefine to "poll" if necessary. |
| # Other mechanisms, e.g. devpoll, kqueue, select, are not yet supported. |
| if (!defined(sb_libevent_method)) { |
| sb_libevent_method = "epoll" |
| } |
| |
| # Whether to allow memory tracking |
| if (!defined(sb_allow_memory_tracking)) { |
| sb_allow_memory_tracking = (cobalt_config != "gold" && !sb_enable_lib) |
| } |
| |
| |
| # The system root for cross-compiles. Default: none. |
| if (!defined(sysroot)) { |
| sysroot = "" |
| } |