# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. Import('env', 'env_test') env = env.Clone() env.Prepend( CPPPATH = [ '$CHROME_DIR/app/resources', '/chrome/tools/build/win', '$CHROME_SRC_DIR', ], CPPDEFINES = [ 'U_STATIC_IMPLEMENTATION', ], ) if env['PLATFORM'] == 'win32': env.Prepend( CCFLAGS = [ '/TP', ], ) env.Append( CPPPATH = [ 'third_party/wtl/include', '$NPAPI_DIR', '$LIBXML_DIR/DerivedSources/include', '$LIBXML_DIR/include', 'app', '$WEBKIT_DIR/build/localized_strings', '$SKIA_DIR/include', '$SKIA_DIR/include/corecg', '$SKIA_DIR/platform', '$LIBPNG_DIR', '$ZLIB_DIR', '$BREAKPAD_DIR/src', '$LIBJPEG_DIR', '$ICU38_DIR/public/common', '$ICU38_DIR/public/i18n', ], ) input_files = [] if env['PLATFORM'] in ('posix', 'win32'): # TODO(port): Port to Mac. input_files.extend([ 'animation.cc', 'chrome_constants.cc', 'chrome_counters.cc', 'chrome_switches.cc', 'debug_flags.cc', 'env_vars.cc', 'gfx/color_utils.cc', 'ipc_message.cc', 'jpeg_codec.cc', 'json_value_serializer.cc', 'libxml_utils.cc', 'net/cookie_monster_sqlite.cc', 'notification_service.cc', 'pref_member.cc', 'pref_names.cc', 'slide_animation.cc', 'sqlite_compiled_statement.cc', 'sqlite_utils.cc', 'task_queue.cc', 'throb_animation.cc', 'thumbnail_score.cc', 'visitedlink_common.cc', ]) if env['PLATFORM'] == 'win32': # TODO(port): Port these. input_files.extend([ 'child_process.cc', 'chrome_paths.cc', 'chrome_plugin_lib.cc', 'chrome_plugin_util.cc', 'chrome_process_filter.cc', 'classfactory.cc', 'clipboard_service.cc', 'common_glue.cc', 'drag_drop_types.cc', 'gfx/chrome_canvas.cc', 'gfx/chrome_font.cc', 'gfx/emf.cc', 'gfx/icon_util.cc', 'gfx/path.cc', 'gfx/url_elider.cc', 'ipc_channel.cc', 'ipc_channel_proxy.cc', 'ipc_logging.cc', 'ipc_message_utils.cc', 'ipc_sync_channel.cc', 'ipc_sync_message.cc', 'jstemplate_builder.cc', 'l10n_util.cc', 'logging_chrome.cc', 'message_router.cc', 'net/url_request_intercept_job.cc', 'notification_registrar.cc', 'os_exchange_data.cc', 'plugin_messages.cc', 'pref_service.cc', 'process_watcher.cc', 'render_messages.cc', 'resource_bundle.cc', 'resource_dispatcher.cc', 'security_filter_peer.cc', 'time_format.cc', 'win_safe_util.cc', 'win_util.cc', 'worker_thread_ticker.cc', ]) if env['PLATFORM'] in ('posix', 'win32'): # TODO(port): This should be enabled for all platforms. env.ChromeStaticLibrary('common', input_files) env_test = env_test.Clone() env_test.Append( CPPPATH = [ '$SKIA_DIR/include', '$SKIA_DIR/include/corecg', '$SKIA_DIR/platform', '$CHROME_SRC_DIR', '$GTEST_DIR/include', ], LIBS = [ 'base', 'gtest', env_test['ICU_LIBS'], # TODO(sgk): '$ICU_LIBS' when scons is fixed ], ) if env_test['PLATFORM'] == 'win32': env_test.Append( LINKFLAGS = [ '/INCREMENTAL', '/safeseh', '/dynamicbase', '/ignore:4199', '/nxcompat', '/DELAYLOAD:"dwmapi.dll"', '/DELAYLOAD:"uxtheme.dll"', '/DEBUG', '/MACHINE:X86', '/FIXED:No', ], LIBS = [ 'rpcrt4.lib', 'shlwapi.lib', 'winmm.lib', ], ) if env_test['PLATFORM'] == 'win32': # TODO(port): Port this. ipc_tests_files = [ '$BASE_DIR/perftimer$OBJSUFFIX', 'ipc_fuzzing_tests.cc', 'ipc_tests.cc', ] libs = [ 'common.lib', ] ipc_tests = env_test.ChromeTestProgram('ipc_tests', ipc_tests_files + libs) i = env_test.Install('$TARGET_ROOT', ipc_tests) Alias('chrome', i)