Home | History | Annotate | Download | only in desktop_capture
      1 # Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
      2 #
      3 # Use of this source code is governed by a BSD-style license
      4 # that can be found in the LICENSE file in the root of the source
      5 # tree. An additional intellectual property rights grant can be found
      6 # in the file PATENTS.  All contributing project authors may
      7 # be found in the AUTHORS file in the root of the source tree.
      8 
      9 {
     10   'targets': [
     11     {
     12       'target_name': 'desktop_capture',
     13       'type': 'static_library',
     14       'dependencies': [
     15         '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
     16         '<(webrtc_root)/base/base.gyp:rtc_base',
     17       ],
     18       'sources': [
     19         'cropped_desktop_frame.cc',
     20         'cropped_desktop_frame.h',
     21         'cropping_window_capturer.cc',
     22         'cropping_window_capturer.h',
     23         'cropping_window_capturer_win.cc',
     24         "desktop_and_cursor_composer.cc",
     25         "desktop_and_cursor_composer.h",
     26         "desktop_capture_types.h",
     27         "desktop_capturer.h",
     28         "desktop_frame.cc",
     29         "desktop_frame.h",
     30         "desktop_frame_win.cc",
     31         "desktop_frame_win.h",
     32         "desktop_geometry.cc",
     33         "desktop_geometry.h",
     34         "desktop_capture_options.h",
     35         "desktop_capture_options.cc",
     36         "desktop_capturer.h",
     37         "desktop_region.cc",
     38         "desktop_region.h",
     39         "differ.cc",
     40         "differ.h",
     41         "differ_block.cc",
     42         "differ_block.h",
     43         "mac/desktop_configuration.h",
     44         "mac/desktop_configuration.mm",
     45         "mac/desktop_configuration_monitor.h",
     46         "mac/desktop_configuration_monitor.cc",
     47         "mac/full_screen_chrome_window_detector.cc",
     48         "mac/full_screen_chrome_window_detector.h",
     49         "mac/scoped_pixel_buffer_object.cc",
     50         "mac/scoped_pixel_buffer_object.h",
     51         "mac/window_list_utils.cc",
     52         "mac/window_list_utils.h",
     53         "mouse_cursor.cc",
     54         "mouse_cursor.h",
     55         "mouse_cursor_monitor.h",
     56         "mouse_cursor_monitor_mac.mm",
     57         "mouse_cursor_monitor_win.cc",
     58         "mouse_cursor_monitor_x11.cc",
     59         "screen_capture_frame_queue.cc",
     60         "screen_capture_frame_queue.h",
     61         "screen_capturer.cc",
     62         "screen_capturer.h",
     63         "screen_capturer_helper.cc",
     64         "screen_capturer_helper.h",
     65         "screen_capturer_mac.mm",
     66         "screen_capturer_win.cc",
     67         "screen_capturer_x11.cc",
     68         "shared_desktop_frame.cc",
     69         "shared_desktop_frame.h",
     70         "shared_memory.cc",
     71         "shared_memory.h",
     72         "win/cursor.cc",
     73         "win/cursor.h",
     74         "win/desktop.cc",
     75         "win/desktop.h",
     76         "win/scoped_gdi_object.h",
     77         "win/scoped_thread_desktop.cc",
     78         "win/scoped_thread_desktop.h",
     79         "win/screen_capturer_win_gdi.cc",
     80         "win/screen_capturer_win_gdi.h",
     81         "win/screen_capturer_win_magnifier.cc",
     82         "win/screen_capturer_win_magnifier.h",
     83         "win/screen_capture_utils.cc",
     84         "win/screen_capture_utils.h",
     85         "win/window_capture_utils.cc",
     86         "win/window_capture_utils.h",
     87         "window_capturer.cc",
     88         "window_capturer.h",
     89         "window_capturer_mac.mm",
     90         "window_capturer_win.cc",
     91         "window_capturer_x11.cc",
     92         "x11/shared_x_display.h",
     93         "x11/shared_x_display.cc",
     94         "x11/x_error_trap.cc",
     95         "x11/x_error_trap.h",
     96         "x11/x_server_pixel_buffer.cc",
     97         "x11/x_server_pixel_buffer.h",
     98       ],
     99       'conditions': [
    100         ['OS!="ios" and (target_arch=="ia32" or target_arch=="x64")', {
    101           'dependencies': [
    102             'desktop_capture_differ_sse2',
    103           ],
    104         }],
    105         ['use_x11 == 1', {
    106           'link_settings': {
    107             'libraries': [
    108               '-lX11',
    109               '-lXcomposite',
    110               '-lXdamage',
    111               '-lXext',
    112               '-lXfixes',
    113               '-lXrender',
    114             ],
    115           },
    116         }],
    117         ['OS!="win" and OS!="mac" and use_x11==0', {
    118           'sources': [
    119             "mouse_cursor_monitor_null.cc",
    120             "screen_capturer_null.cc",
    121             "window_capturer_null.cc",
    122           ],
    123         }],
    124         ['OS=="mac"', {
    125           'link_settings': {
    126             'libraries': [
    127               '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
    128               '$(SDKROOT)/System/Library/Frameworks/IOKit.framework',
    129               '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
    130             ],
    131           },
    132         }],
    133       ],
    134     },
    135   ],  # targets
    136   'conditions': [
    137     ['OS!="ios" and (target_arch=="ia32" or target_arch=="x64")', {
    138       'targets': [
    139         {
    140           # Have to be compiled as a separate target because it needs to be
    141           # compiled with SSE2 enabled.
    142           'target_name': 'desktop_capture_differ_sse2',
    143           'type': 'static_library',
    144           'sources': [
    145             "differ_block_sse2.cc",
    146             "differ_block_sse2.h",
    147           ],
    148           'conditions': [
    149             ['os_posix==1', {
    150               'cflags': [ '-msse2', ],
    151               'xcode_settings': {
    152                 'OTHER_CFLAGS': [ '-msse2', ],
    153               },
    154             }],
    155           ],
    156         },
    157       ],  # targets
    158     }],
    159   ],
    160 }
    161