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