base.gyp revision 4a5e2dc747d50c653511c68ccb2cfbfb740bd5a7
1# Copyright (c) 2010 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/char_iterator.cc', 35 'i18n/char_iterator.h', 36 'i18n/file_util_icu.cc', 37 'i18n/file_util_icu.h', 38 'i18n/icu_encoding_detection.cc', 39 'i18n/icu_encoding_detection.h', 40 'i18n/icu_string_conversions.cc', 41 'i18n/icu_string_conversions.h', 42 'i18n/icu_util.cc', 43 'i18n/icu_util.h', 44 'i18n/number_formatting.cc', 45 'i18n/number_formatting.h', 46 'i18n/rtl.cc', 47 'i18n/rtl.h', 48 'i18n/time_formatting.cc', 49 'i18n/time_formatting.h', 50 'i18n/word_iterator.cc', 51 'i18n/word_iterator.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 'cancellation_flag_unittest.cc', 69 'command_line_unittest.cc', 70 'condition_variable_unittest.cc', 71 'crypto/encryptor_unittest.cc', 72 'crypto/rsa_private_key_unittest.cc', 73 'crypto/rsa_private_key_nss_unittest.cc', 74 'crypto/signature_creator_unittest.cc', 75 'crypto/signature_verifier_unittest.cc', 76 'crypto/symmetric_key_unittest.cc', 77 'data_pack_unittest.cc', 78 'debug/leak_tracker_unittest.cc', 79 'debug/stack_trace_unittest.cc', 80 'debug/trace_event_win_unittest.cc', 81 'dir_reader_posix_unittest.cc', 82 'environment_unittest.cc', 83 'file_descriptor_shuffle_unittest.cc', 84 'file_path_unittest.cc', 85 'file_util_unittest.cc', 86 'file_version_info_unittest.cc', 87 'gmock_unittest.cc', 88 'hmac_unittest.cc', 89 'id_map_unittest.cc', 90 'i18n/char_iterator_unittest.cc', 91 'i18n/file_util_icu_unittest.cc', 92 'i18n/icu_string_conversions_unittest.cc', 93 'i18n/rtl_unittest.cc', 94 'i18n/word_iterator_unittest.cc', 95 'json/json_reader_unittest.cc', 96 'json/json_writer_unittest.cc', 97 'json/string_escape_unittest.cc', 98 'lazy_instance_unittest.cc', 99 'linked_list_unittest.cc', 100 'linked_ptr_unittest.cc', 101 'lock_unittest.cc', 102 'logging_unittest.cc', 103 '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 'non_thread_safe_unittest.cc', 111 'object_watcher_unittest.cc', 112 'observer_list_unittest.cc', 113 'path_service_unittest.cc', 114 'pickle_unittest.cc', 115 'platform_file_unittest.cc', 116 'platform_thread_unittest.cc', 117 'pr_time_unittest.cc', 118 'process_util_unittest.cc', 119 'process_util_unittest_mac.h', 120 'process_util_unittest_mac.mm', 121 'rand_util_unittest.cc', 122 'ref_counted_unittest.cc', 123 'scoped_native_library_unittest.cc', 124 'scoped_ptr_unittest.cc', 125 'scoped_temp_dir_unittest.cc', 126 'sha1_unittest.cc', 127 'sha2_unittest.cc', 128 'shared_memory_unittest.cc', 129 'simple_thread_unittest.cc', 130 'singleton_unittest.cc', 131 'stack_container_unittest.cc', 132 'string16_unittest.cc', 133 'string_number_conversions_unittest.cc', 134 'string_piece_unittest.cc', 135 'string_split_unittest.cc', 136 'string_tokenizer_unittest.cc', 137 'string_util_unittest.cc', 138 'stringize_macros_unittest.cc', 139 'stringprintf_unittest.cc', 140 'sys_info_unittest.cc', 141 'sys_string_conversions_mac_unittest.mm', 142 'sys_string_conversions_unittest.cc', 143 'task_queue_unittest.cc', 144 'thread_checker_unittest.cc', 145 'thread_collision_warner_unittest.cc', 146 'thread_local_storage_unittest.cc', 147 'thread_local_unittest.cc', 148 'thread_unittest.cc', 149 'time_unittest.cc', 150 'time_win_unittest.cc', 151 'timer_unittest.cc', 152 'tools_sanity_unittest.cc', 153 'tracked_objects_unittest.cc', 154 'tuple_unittest.cc', 155 'utf_offset_string_conversions_unittest.cc', 156 'utf_string_conversions_unittest.cc', 157 'values_unittest.cc', 158 'version_unittest.cc', 159 'vlog_unittest.cc', 160 'waitable_event_unittest.cc', 161 'waitable_event_watcher_unittest.cc', 162 'watchdog_unittest.cc', 163 'weak_ptr_unittest.cc', 164 'win_util_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/pe_image_unittest.cc', 170 'win/registry_unittest.cc', 171 'win/scoped_bstr_unittest.cc', 172 'win/scoped_comptr_unittest.cc', 173 'win/scoped_variant_unittest.cc', 174 'worker_pool_unittest.cc', 175 ], 176 'include_dirs': [ 177 # word_iterator.h (used by word_iterator_unittest.cc) leaks an ICU 178 # #include for unicode/uchar.h. This should probably be cleaned up. 179 '../third_party/icu/public/common', 180 ], 181 'dependencies': [ 182 'base', 183 'base_i18n', 184 'test_support_base', 185 '../testing/gmock.gyp:gmock', 186 '../testing/gtest.gyp:gtest', 187 ], 188 'conditions': [ 189 ['OS == "linux" or OS == "freebsd" or OS == "openbsd" or OS == "solaris"', { 190 'sources!': [ 191 'file_version_info_unittest.cc', 192 'worker_pool_linux_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 ], 226 }, { # OS != "win" 227 'sources/': [ 228 ['exclude', '^win/'], 229 ], 230 'sources!': [ 231 'object_watcher_unittest.cc', 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/multiprocess_test.cc', 265 'test/multiprocess_test.h', 266 'test/perf_test_suite.cc', 267 'test/perf_test_suite.h', 268 'test/test_file_util.h', 269 'test/test_file_util_linux.cc', 270 'test/test_file_util_mac.cc', 271 'test/test_file_util_posix.cc', 272 'test/test_file_util_win.cc', 273 'test/test_suite.cc', 274 'test/test_suite.h', 275 'test/test_switches.cc', 276 'test/test_switches.h', 277 'test/test_timeouts.cc', 278 'test/test_timeouts.h', 279 ], 280 }, 281 { 282 'target_name': 'test_support_perf', 283 'type': '<(library)', 284 'dependencies': [ 285 'base', 286 '../testing/gtest.gyp:gtest', 287 ], 288 'sources': [ 289 'perftimer.cc', 290 'test/run_all_perftests.cc', 291 ], 292 'direct_dependent_settings': { 293 'defines': [ 294 'PERF_TEST', 295 ], 296 }, 297 'conditions': [ 298 ['OS == "linux" or OS == "freebsd" or OS == "openbsd" or OS == "solaris"', { 299 'dependencies': [ 300 # Needed to handle the #include chain: 301 # base/test/perf_test_suite.h 302 # base/test/test_suite.h 303 # gtk/gtk.h 304 '../build/linux/system.gyp:gtk', 305 ], 306 }], 307 ], 308 }, 309 ], 310 'conditions': [ 311 [ 'OS == "win"', { 312 'targets': [ 313 { 314 'target_name': 'debug_message', 315 'type': 'executable', 316 'sources': [ 317 'debug_message.cc', 318 ], 319 'msvs_settings': { 320 'VCLinkerTool': { 321 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS 322 }, 323 }, 324 }, 325 ], 326 }], 327 ], 328} 329 330# Local Variables: 331# tab-width:2 332# indent-tabs-mode:nil 333# End: 334# vim: set expandtab tabstop=2 shiftwidth=2: 335