base.gyp revision 72a454cd3513ac24fbdd0e0cb9ad70b86a99b801
1# Copyright (c) 2011 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 }, 9 'includes': [ 10 'base.gypi', 11 ], 12 'targets': [ 13 { 14 'target_name': 'base_i18n', 15 'type': '<(library)', 16 'msvs_guid': '968F3222-9798-4D21-BE08-15ECB5EF2994', 17 'dependencies': [ 18 'base', 19 '../third_party/icu/icu.gyp:icui18n', 20 '../third_party/icu/icu.gyp:icuuc', 21 ], 22 'conditions': [ 23 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', { 24 'dependencies': [ 25 # i18n/rtl.cc uses gtk 26 '../build/linux/system.gyp:gtk', 27 ], 28 }], 29 ], 30 'export_dependent_settings': [ 31 'base', 32 ], 33 'sources': [ 34 'i18n/bidi_line_iterator.cc', 35 'i18n/bidi_line_iterator.h', 36 'i18n/break_iterator.cc', 37 'i18n/break_iterator.h', 38 'i18n/char_iterator.cc', 39 'i18n/char_iterator.h', 40 'i18n/file_util_icu.cc', 41 'i18n/file_util_icu.h', 42 'i18n/icu_encoding_detection.cc', 43 'i18n/icu_encoding_detection.h', 44 'i18n/icu_string_conversions.cc', 45 'i18n/icu_string_conversions.h', 46 'i18n/icu_util.cc', 47 'i18n/icu_util.h', 48 'i18n/number_formatting.cc', 49 'i18n/number_formatting.h', 50 'i18n/rtl.cc', 51 'i18n/rtl.h', 52 'i18n/time_formatting.cc', 53 'i18n/time_formatting.h', 54 ], 55 }, 56 { 57 'target_name': 'base_unittests', 58 'type': 'executable', 59 'msvs_guid': '27A30967-4BBA-48D1-8522-CDE95F7B1CEC', 60 'sources': [ 61 # Infrastructure files. 62 'test/run_all_unittests.cc', 63 64 # Tests. 65 'at_exit_unittest.cc', 66 'atomicops_unittest.cc', 67 'base64_unittest.cc', 68 'bind_unittest.cc', 69 'bits_unittest.cc', 70 'callback_unittest.cc', 71 'command_line_unittest.cc', 72 'crypto/encryptor_unittest.cc', 73 'crypto/rsa_private_key_unittest.cc', 74 'crypto/rsa_private_key_nss_unittest.cc', 75 'crypto/secure_hash_unittest.cc', 76 'crypto/signature_creator_unittest.cc', 77 'crypto/signature_verifier_unittest.cc', 78 'crypto/symmetric_key_unittest.cc', 79 'debug/leak_tracker_unittest.cc', 80 'debug/stack_trace_unittest.cc', 81 'debug/trace_event_win_unittest.cc', 82 'dir_reader_posix_unittest.cc', 83 'environment_unittest.cc', 84 'file_descriptor_shuffle_unittest.cc', 85 'file_path_unittest.cc', 86 'file_util_unittest.cc', 87 'file_version_info_unittest.cc', 88 'gmock_unittest.cc', 89 'hmac_unittest.cc', 90 'id_map_unittest.cc', 91 'i18n/break_iterator_unittest.cc', 92 'i18n/char_iterator_unittest.cc', 93 'i18n/file_util_icu_unittest.cc', 94 'i18n/icu_string_conversions_unittest.cc', 95 'i18n/rtl_unittest.cc', 96 'json/json_reader_unittest.cc', 97 'json/json_writer_unittest.cc', 98 'json/string_escape_unittest.cc', 99 'lazy_instance_unittest.cc', 100 'linked_list_unittest.cc', 101 'linked_ptr_unittest.cc', 102 'logging_unittest.cc', 103 'mac/mac_util_unittest.mm', 104 'message_loop_proxy_impl_unittest.cc', 105 'message_loop_unittest.cc', 106 'message_pump_glib_unittest.cc', 107 'metrics/field_trial_unittest.cc', 108 'metrics/histogram_unittest.cc', 109 'metrics/stats_table_unittest.cc', 110 'observer_list_unittest.cc', 111 'path_service_unittest.cc', 112 'pickle_unittest.cc', 113 'platform_file_unittest.cc', 114 'pr_time_unittest.cc', 115 'process_util_unittest.cc', 116 'process_util_unittest_mac.h', 117 'process_util_unittest_mac.mm', 118 'rand_util_unittest.cc', 119 'ref_counted_unittest.cc', 120 'scoped_native_library_unittest.cc', 121 'scoped_ptr_unittest.cc', 122 'scoped_temp_dir_unittest.cc', 123 'sha1_unittest.cc', 124 'sha2_unittest.cc', 125 'shared_memory_unittest.cc', 126 'singleton_unittest.cc', 127 'stack_container_unittest.cc', 128 'string16_unittest.cc', 129 'string_number_conversions_unittest.cc', 130 'string_piece_unittest.cc', 131 'string_split_unittest.cc', 132 'string_tokenizer_unittest.cc', 133 'string_util_unittest.cc', 134 'stringize_macros_unittest.cc', 135 'stringprintf_unittest.cc', 136 'synchronization/cancellation_flag_unittest.cc', 137 'synchronization/condition_variable_unittest.cc', 138 'synchronization/lock_unittest.cc', 139 'synchronization/waitable_event_unittest.cc', 140 'synchronization/waitable_event_watcher_unittest.cc', 141 'sys_info_unittest.cc', 142 'sys_string_conversions_mac_unittest.mm', 143 'sys_string_conversions_unittest.cc', 144 'task_queue_unittest.cc', 145 'task_unittest.cc', 146 'template_util_unittest.cc', 147 'threading/non_thread_safe_unittest.cc', 148 'threading/platform_thread_unittest.cc', 149 'threading/simple_thread_unittest.cc', 150 'threading/thread_checker_unittest.cc', 151 'threading/thread_collision_warner_unittest.cc', 152 'threading/thread_local_storage_unittest.cc', 153 'threading/thread_local_unittest.cc', 154 'threading/thread_unittest.cc', 155 'threading/watchdog_unittest.cc', 156 'threading/worker_pool_posix_unittest.cc', 157 'threading/worker_pool_unittest.cc', 158 'time_unittest.cc', 159 'time_win_unittest.cc', 160 'timer_unittest.cc', 161 'tools_sanity_unittest.cc', 162 'tracked_objects_unittest.cc', 163 'tuple_unittest.cc', 164 'utf_offset_string_conversions_unittest.cc', 165 'utf_string_conversions_unittest.cc', 166 'values_unittest.cc', 167 'version_unittest.cc', 168 'vlog_unittest.cc', 169 'weak_ptr_unittest.cc', 170 'win/event_trace_consumer_unittest.cc', 171 'win/event_trace_controller_unittest.cc', 172 'win/event_trace_provider_unittest.cc', 173 'win/i18n_unittest.cc', 174 'win/object_watcher_unittest.cc', 175 'win/pe_image_unittest.cc', 176 'win/registry_unittest.cc', 177 'win/scoped_bstr_unittest.cc', 178 'win/scoped_comptr_unittest.cc', 179 'win/scoped_variant_unittest.cc', 180 'win/win_util_unittest.cc', 181 ], 182 'dependencies': [ 183 'base', 184 'base_i18n', 185 'test_support_base', 186 '../testing/gmock.gyp:gmock', 187 '../testing/gtest.gyp:gtest', 188 ], 189 'conditions': [ 190 ['OS == "linux" or OS == "freebsd" or OS == "openbsd" or OS == "solaris"', { 191 'sources!': [ 192 'file_version_info_unittest.cc', 193 ], 194 'sources': [ 195 'nix/xdg_util_unittest.cc', 196 ], 197 'conditions': [ 198 [ 'linux_use_tcmalloc==1', { 199 'dependencies': [ 200 'allocator/allocator.gyp:allocator', 201 ], 202 }, 203 ], 204 ], 205 'dependencies': [ 206 '../build/linux/system.gyp:gtk', 207 '../build/linux/system.gyp:nss', 208 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck', 209 ], 210 }, { # OS != "linux" and OS != "freebsd" and OS != "openbsd" and OS != "solaris" 211 'sources!': [ 212 'message_pump_glib_unittest.cc', 213 'crypto/rsa_private_key_nss_unittest.cc', 214 ] 215 }], 216 # This is needed to trigger the dll copy step on windows. 217 # TODO(mark): This should not be necessary. 218 ['OS == "win"', { 219 'dependencies': [ 220 '../third_party/icu/icu.gyp:icudata', 221 ], 222 'sources!': [ 223 'dir_reader_posix_unittest.cc', 224 'file_descriptor_shuffle_unittest.cc', 225 'threading/worker_pool_posix_unittest.cc', 226 ], 227 }, { # OS != "win" 228 'sources/': [ 229 ['exclude', '^win/'], 230 ], 231 'sources!': [ 232 'system_monitor_unittest.cc', 233 'time_win_unittest.cc', 234 'trace_event_win_unittest.cc', 235 'win_util_unittest.cc', 236 ], 237 }], 238 [ 'use_openssl==1', { 239 'sources!': [ 240 'crypto/rsa_private_key_nss_unittest.cc', 241 ], 242 }], 243 ], 244 }, 245 { 246 'target_name': 'test_support_base', 247 'type': '<(library)', 248 'dependencies': [ 249 'base', 250 'base_i18n', 251 '../testing/gmock.gyp:gmock', 252 '../testing/gtest.gyp:gtest', 253 ], 254 'conditions': [ 255 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', { 256 'dependencies': [ 257 # test_suite initializes GTK. 258 '../build/linux/system.gyp:gtk', 259 ], 260 }], 261 ], 262 'sources': [ 263 'perftimer.cc', 264 'test/mock_chrome_application_mac.h', 265 'test/mock_chrome_application_mac.mm', 266 'test/multiprocess_test.cc', 267 'test/multiprocess_test.h', 268 'test/perf_test_suite.cc', 269 'test/perf_test_suite.h', 270 'test/test_file_util.h', 271 'test/test_file_util_linux.cc', 272 'test/test_file_util_mac.cc', 273 'test/test_file_util_posix.cc', 274 'test/test_file_util_win.cc', 275 'test/test_suite.cc', 276 'test/test_suite.h', 277 'test/test_switches.cc', 278 'test/test_switches.h', 279 'test/test_timeouts.cc', 280 'test/test_timeouts.h', 281 ], 282 }, 283 { 284 'target_name': 'test_support_perf', 285 'type': '<(library)', 286 'dependencies': [ 287 'base', 288 '../testing/gtest.gyp:gtest', 289 ], 290 'sources': [ 291 'perftimer.cc', 292 'test/run_all_perftests.cc', 293 ], 294 'direct_dependent_settings': { 295 'defines': [ 296 'PERF_TEST', 297 ], 298 }, 299 'conditions': [ 300 ['OS == "linux" or OS == "freebsd" or OS == "openbsd" or OS == "solaris"', { 301 'dependencies': [ 302 # Needed to handle the #include chain: 303 # base/test/perf_test_suite.h 304 # base/test/test_suite.h 305 # gtk/gtk.h 306 '../build/linux/system.gyp:gtk', 307 ], 308 }], 309 ], 310 }, 311 ], 312 'conditions': [ 313 [ 'OS == "win"', { 314 'targets': [ 315 { 316 'target_name': 'debug_message', 317 'type': 'executable', 318 'sources': [ 319 'debug_message.cc', 320 ], 321 'msvs_settings': { 322 'VCLinkerTool': { 323 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS 324 }, 325 }, 326 }, 327 ], 328 }], 329 ], 330} 331 332# Local Variables: 333# tab-width:2 334# indent-tabs-mode:nil 335# End: 336# vim: set expandtab tabstop=2 shiftwidth=2: 337