1 # Copyright 2013 The Chromium Authors. All rights reserved. 2 # Use of this source code is governed by a BSD-style license that can be 3 # found in the LICENSE file. 4 5 { 6 'variables': { 7 'chromium_code': 1, 8 'external_ozone_platforms': [], 9 'external_ozone_platform_files': [], 10 'external_ozone_platform_deps': [], 11 'external_ozone_platform_unittest_deps': [], 12 'internal_ozone_platforms': [], 13 'internal_ozone_platform_deps': [], 14 'internal_ozone_platform_unittest_deps': [], 15 }, 16 'targets': [ 17 { 18 'target_name': 'ozone_base', 19 'type': '<(component)', 20 'dependencies': [ 21 '<(DEPTH)/base/base.gyp:base', 22 '<(DEPTH)/skia/skia.gyp:skia', 23 '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry', 24 ], 25 'defines': [ 26 'OZONE_BASE_IMPLEMENTATION', 27 ], 28 'sources': [ 29 'public/cursor_factory_ozone.cc', 30 'public/cursor_factory_ozone.h', 31 'public/event_factory_ozone.cc', 32 'public/event_factory_ozone.h', 33 'public/gpu_platform_support.cc', 34 'public/gpu_platform_support.h', 35 'public/gpu_platform_support_host.cc', 36 'public/gpu_platform_support_host.h', 37 'public/overlay_candidates_ozone.cc', 38 'public/overlay_candidates_ozone.h', 39 'public/surface_factory_ozone.cc', 40 'public/surface_factory_ozone.h', 41 'public/surface_ozone_canvas.h', 42 'public/surface_ozone_egl.h', 43 ], 44 }, 45 { 46 'target_name': 'ozone', 47 'type': '<(component)', 48 'dependencies': [ 49 '<(DEPTH)/base/base.gyp:base', 50 '<(DEPTH)/ui/events/events.gyp:events', 51 '<(DEPTH)/ui/events/ozone/events_ozone.gyp:events_ozone', 52 '<(DEPTH)/ui/gfx/gfx.gyp:gfx', 53 '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry', 54 '<(DEPTH)/skia/skia.gyp:skia', 55 '<@(external_ozone_platform_deps)', 56 '<@(internal_ozone_platform_deps)', 57 'ozone_base', 58 ], 59 'defines': [ 60 'OZONE_IMPLEMENTATION', 61 ], 62 'variables': { 63 'platform_list_cc_file': '<(INTERMEDIATE_DIR)/ui/ozone/platform_list.cc', 64 'platform_list_h_file': '<(SHARED_INTERMEDIATE_DIR)/ui/ozone/platform_list.h', 65 'platform_list_txt_file': '<(SHARED_INTERMEDIATE_DIR)/ui/ozone/platform_list.txt', 66 'constructor_list_cc_file': '<(INTERMEDIATE_DIR)/ui/ozone/constructor_list.cc', 67 'ozone_platforms': [ 68 '<@(external_ozone_platforms)', 69 '<@(internal_ozone_platforms)', 70 ], 71 }, 72 'include_dirs': [ 73 '<(SHARED_INTERMEDIATE_DIR)', 74 ], 75 'sources': [ 76 '<(platform_list_cc_file)', 77 '<(platform_list_h_file)', 78 '<(constructor_list_cc_file)', 79 80 # common/chromeos files are excluded automatically when building with 81 # chromeos=0, by exclusion rules in filename_rules.gypi due to the 82 # 'chromeos' folder name. 83 'common/chromeos/native_display_delegate_ozone.cc', 84 'common/chromeos/native_display_delegate_ozone.h', 85 'common/chromeos/touchscreen_device_manager_ozone.cc', 86 'common/chromeos/touchscreen_device_manager_ozone.h', 87 'ozone_platform.cc', 88 'ozone_platform.h', 89 'ozone_switches.cc', 90 'ozone_switches.h', 91 'platform_selection.cc', 92 'platform_selection.h', 93 '<@(external_ozone_platform_files)', 94 ], 95 'actions': [ 96 { 97 'action_name': 'generate_ozone_platform_list', 98 'variables': { 99 'generator_path': 'generate_ozone_platform_list.py', 100 }, 101 'inputs': [ 102 '<(generator_path)', 103 ], 104 'outputs': [ 105 '<(platform_list_cc_file)', 106 '<(platform_list_h_file)', 107 '<(platform_list_txt_file)', 108 ], 109 'action': [ 110 'python', 111 '<(generator_path)', 112 '--output_cc=<(platform_list_cc_file)', 113 '--output_h=<(platform_list_h_file)', 114 '--output_txt=<(platform_list_txt_file)', 115 '--default=<(ozone_platform)', 116 '<@(ozone_platforms)', 117 ], 118 }, 119 { 120 'action_name': 'generate_constructor_list', 121 'variables': { 122 'generator_path': 'generate_constructor_list.py', 123 }, 124 'inputs': [ 125 '<(generator_path)', 126 '<(platform_list_txt_file)', 127 ], 128 'outputs': [ 129 '<(constructor_list_cc_file)', 130 ], 131 'action': [ 132 'python', 133 '<(generator_path)', 134 '--platform_list=<(platform_list_txt_file)', 135 '--output_cc=<(constructor_list_cc_file)', 136 '--namespace=ui', 137 '--typename=OzonePlatform', 138 '--include="ui/ozone/ozone_platform.h"' 139 ], 140 }, 141 ], 142 'conditions': [ 143 ['use_udev == 0', { 144 'sources/': [ 145 ['exclude', '_udev\\.(h|cc)$'], 146 ], 147 }], 148 ['chromeos==1', { 149 'dependencies': [ 150 '<(DEPTH)/ui/display/display.gyp:display_types', 151 ], 152 }], 153 ], 154 }, 155 { 156 'target_name': 'ozone_unittests', 157 'type': '<(gtest_target_type)', 158 'sources': [ 159 'run_all_unittests.cc', 160 ], 161 'dependencies': [ 162 'ozone', 163 'ozone_base', 164 '../../base/base.gyp:base', 165 '../../base/base.gyp:test_support_base', 166 '../../testing/gtest.gyp:gtest', 167 '<@(external_ozone_platform_unittest_deps)', 168 '<@(internal_ozone_platform_unittest_deps)', 169 ], 170 }, 171 ], 172 'conditions': [ 173 ['<(ozone_platform_caca) == 1', { 174 'includes': [ 175 'platform/caca/caca.gypi', 176 ], 177 }], 178 ['<(ozone_platform_dri) == 1 or <(ozone_platform_gbm) == 1', { 179 'includes': [ 180 'platform/dri/dri.gypi', 181 ], 182 }], 183 ['<(ozone_platform_egltest) == 1', { 184 'includes': [ 185 'platform/egltest/egltest.gypi', 186 ], 187 }], 188 ['<(ozone_platform_gbm) == 1', { 189 'includes': [ 190 'platform/dri/gbm.gypi', 191 ], 192 }], 193 ['<(ozone_platform_test) == 1', { 194 'includes': [ 195 'platform/test/test.gypi', 196 ], 197 }], 198 ], 199 } 200