Home | History | Annotate | Download | only in sync
      1 # Copyright 2013 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 
     10   'includes': [
     11     'sync_android.gypi',
     12     'sync_tests.gypi',
     13   ],
     14 
     15   'conditions': [
     16     # Notes:
     17     # 1) In static mode, the public 'sync' target has a target type of 'none',
     18     #    and is composed of the static library targets 'sync_api', 'sync_core',
     19     #    'sync_internal_api', 'sync_notifier', and 'sync_proto'.
     20     # 2) In component mode, we build the public 'sync' target into a single DLL,
     21     #    which includes the contents of sync_api.gypi, sync_core.gypi,
     22     #    sync_internal_api.gypi, sync_notifier.gypi, and sync_proto.gypi.
     23     # 3) All external targets that depend on anything in sync/ must simply
     24     #    declare a dependency on 'sync.gyp:sync'
     25     ['component=="static_library"', {
     26       'targets': [
     27         # The public sync static library target.
     28         {
     29           'target_name': 'sync',
     30           'type': 'none',
     31           'dependencies': [
     32             'sync_api',
     33             'sync_core',
     34             'sync_internal_api',
     35             'sync_notifier',
     36             'sync_proto',
     37           ],
     38           'export_dependent_settings': [
     39             'sync_notifier',
     40             'sync_proto',
     41           ],
     42         },
     43 
     44         # The sync external API library.
     45         {
     46           'target_name': 'sync_api',
     47           'type': 'static_library',
     48           'variables': { 'enable_wexit_time_destructors': 1, },
     49           'includes': [
     50             'sync_api.gypi',
     51           ],
     52           'dependencies': [
     53             'sync_internal_api',
     54             'sync_proto',
     55           ],
     56         },
     57 
     58         # The core sync library.
     59         {
     60           'target_name': 'sync_core',
     61           'type': 'static_library',
     62           'variables': { 'enable_wexit_time_destructors': 1, },
     63           'includes': [
     64             'sync_core.gypi',
     65           ],
     66           'dependencies': [
     67             'sync_notifier',
     68             'sync_proto',
     69           ],
     70           'export_dependent_settings': [
     71             'sync_notifier',
     72             'sync_proto',
     73           ],
     74         },
     75 
     76         # The sync internal API library.
     77         {
     78           'target_name': 'sync_internal_api',
     79           'type': 'static_library',
     80           'variables': { 'enable_wexit_time_destructors': 1, },
     81           'includes': [
     82             'sync_internal_api.gypi',
     83           ],
     84           'dependencies': [
     85             'sync_core',
     86             'sync_notifier',
     87             'sync_proto',
     88           ],
     89           'export_dependent_settings': [
     90             'sync_core',
     91             'sync_proto',
     92           ],
     93         },
     94 
     95         # The sync notifications library.
     96         {
     97           'target_name': 'sync_notifier',
     98           'type': 'static_library',
     99           'variables': { 'enable_wexit_time_destructors': 1, },
    100           'includes': [
    101             'sync_notifier.gypi',
    102           ],
    103         },
    104 
    105         # The sync protocol buffer library.
    106         {
    107           # GN version: //sync/protocol
    108           'target_name': 'sync_proto',
    109           'type': 'static_library',
    110           'variables': { 'enable_wexit_time_destructors': 1, },
    111           'includes': [
    112             'sync_proto.gypi',
    113           ],
    114         },
    115       ],
    116     },
    117     {  # component != static_library
    118       'targets': [
    119         # The public sync shared library target.
    120         {
    121           'target_name': 'sync',
    122           'type': 'shared_library',
    123           'variables': { 'enable_wexit_time_destructors': 1, },
    124           'includes': [
    125             'sync_api.gypi',
    126             'sync_core.gypi',
    127             'sync_internal_api.gypi',
    128             'sync_notifier.gypi',
    129             'sync_proto.gypi',
    130           ],
    131         },
    132       ],
    133     }],
    134   ],
    135 }
    136