Home | History | Annotate | Download | only in ipc
      1 # Copyright (c) 2012 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     'ipc.gypi',
     11   ],
     12   'targets': [
     13     {
     14       'target_name': 'ipc',
     15       'type': '<(component)',
     16       'variables': {
     17         'ipc_target': 1,
     18       },
     19       'dependencies': [
     20         '../base/base.gyp:base',
     21         # TODO(viettrungluu): Needed for base/lazy_instance.h, which is suspect.
     22         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
     23       ],
     24       # TODO(gregoryd): direct_dependent_settings should be shared with the
     25       # 64-bit target, but it doesn't work due to a bug in gyp
     26       'direct_dependent_settings': {
     27         'include_dirs': [
     28           '..',
     29         ],
     30       },
     31     },
     32     {
     33       'target_name': 'ipc_tests',
     34       'type': '<(gtest_target_type)',
     35       'dependencies': [
     36         'ipc',
     37         'test_support_ipc',
     38         '../base/base.gyp:base',
     39         '../base/base.gyp:base_i18n',
     40         '../base/base.gyp:run_all_unittests',
     41         '../base/base.gyp:test_support_base',
     42         '../testing/gtest.gyp:gtest',
     43       ],
     44       'include_dirs': [
     45         '..'
     46       ],
     47       'sources': [
     48         'file_descriptor_set_posix_unittest.cc',
     49         'ipc_channel_posix_unittest.cc',
     50         'ipc_channel_unittest.cc',
     51         'ipc_fuzzing_tests.cc',
     52         'ipc_message_unittest.cc',
     53         'ipc_message_utils_unittest.cc',
     54         'ipc_send_fds_test.cc',
     55         'ipc_sync_channel_unittest.cc',
     56         'ipc_sync_message_unittest.cc',
     57         'ipc_sync_message_unittest.h',
     58         'ipc_test_base.cc',
     59         'ipc_test_base.h',
     60         'sync_socket_unittest.cc',
     61         'unix_domain_socket_util_unittest.cc',
     62       ],
     63       'conditions': [
     64         ['toolkit_uses_gtk == 1', {
     65           'dependencies': [
     66             '../build/linux/system.gyp:gtk',
     67           ],
     68         }],
     69         ['OS == "win" or OS == "ios"', {
     70           'sources!': [
     71             'unix_domain_socket_util_unittest.cc',
     72           ],
     73         }],
     74         ['OS == "android" and gtest_target_type == "shared_library"', {
     75           'dependencies': [
     76             '../testing/android/native_test.gyp:native_test_native_code',
     77           ],
     78         }],
     79         ['os_posix == 1 and OS != "mac" and OS != "android"', {
     80           'conditions': [
     81             ['linux_use_tcmalloc==1', {
     82               'dependencies': [
     83                 '../base/allocator/allocator.gyp:allocator',
     84               ],
     85             }],
     86           ],
     87         }]
     88       ],
     89     },
     90     {
     91       'target_name': 'ipc_perftests',
     92       'type': '<(gtest_target_type)',
     93       # TODO(viettrungluu): Figure out which dependencies are really needed.
     94       'dependencies': [
     95         'ipc',
     96         'test_support_ipc',
     97         '../base/base.gyp:base',
     98         '../base/base.gyp:base_i18n',
     99         '../base/base.gyp:test_support_base',
    100         '../base/base.gyp:test_support_perf',
    101         '../testing/gtest.gyp:gtest',
    102       ],
    103       'include_dirs': [
    104         '..'
    105       ],
    106       'sources': [
    107         'ipc_perftests.cc',
    108         'ipc_test_base.cc',
    109         'ipc_test_base.h',
    110       ],
    111       'conditions': [
    112         ['toolkit_uses_gtk == 1', {
    113           'dependencies': [
    114             '../build/linux/system.gyp:gtk',
    115           ],
    116         }],
    117         ['OS == "android" and gtest_target_type == "shared_library"', {
    118           'dependencies': [
    119             '../testing/android/native_test.gyp:native_test_native_code',
    120           ],
    121         }],
    122         ['os_posix == 1 and OS != "mac" and OS != "android"', {
    123           'conditions': [
    124             ['linux_use_tcmalloc==1', {
    125               'dependencies': [
    126                 '../base/allocator/allocator.gyp:allocator',
    127               ],
    128             }],
    129           ],
    130         }]
    131       ],
    132     },
    133     {
    134       'target_name': 'test_support_ipc',
    135       'type': 'static_library',
    136       'dependencies': [
    137         'ipc',
    138         '../base/base.gyp:base',
    139         '../testing/gtest.gyp:gtest',
    140       ],
    141       'sources': [
    142         'ipc_multiprocess_test.cc',
    143         'ipc_multiprocess_test.h',
    144         'ipc_test_sink.cc',
    145         'ipc_test_sink.h',
    146       ],
    147     },
    148   ],
    149   'conditions': [
    150     ['OS=="win" and target_arch=="ia32"', {
    151       'targets': [
    152         {
    153           'target_name': 'ipc_win64',
    154           'type': '<(component)',
    155           'variables': {
    156             'ipc_target': 1,
    157           },
    158           'dependencies': [
    159             '../base/base.gyp:base_nacl_win64',
    160             # TODO(viettrungluu): Needed for base/lazy_instance.h, which is
    161             # suspect.
    162             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
    163           ],
    164           # TODO(gregoryd): direct_dependent_settings should be shared with the
    165           # 32-bit target, but it doesn't work due to a bug in gyp
    166           'direct_dependent_settings': {
    167             'include_dirs': [
    168               '..',
    169             ],
    170           },
    171           'configurations': {
    172             'Common_Base': {
    173               'msvs_target_platform': 'x64',
    174             },
    175           },
    176         },
    177       ],
    178     }],
    179     # Special target to wrap a gtest_target_type==shared_library
    180     # ipc_tests into an android apk for execution.
    181     # See base.gyp for TODO(jrg)s about this strategy.
    182     ['OS == "android" and gtest_target_type == "shared_library"', {
    183       'targets': [
    184         {
    185           'target_name': 'ipc_tests_apk',
    186           'type': 'none',
    187           'dependencies': [
    188             'ipc_tests',
    189           ],
    190           'variables': {
    191             'test_suite_name': 'ipc_tests',
    192             'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)ipc_tests<(SHARED_LIB_SUFFIX)',
    193           },
    194           'includes': [ '../build/apk_test.gypi' ],
    195         }],
    196     }],
    197   ],
    198 }
    199