Hash :
dcab56a1
        
        Author :
  
        
        Date :
2017-01-05T14:47:34
        
      
Move some file utils to common. Since common is shared through all ANGLE code (libANGLE/tests/samples) this is the most general place for these utils, and will give libANGLE access to them. We'll need them to get the current executable dir for loading the Vulkan layers. This also means we'll need to fix the global static variable use when we have the ability. BUG=angleproject:1319 BUG=chromium:677841 Change-Id: I7af61920635135b28a2f02f4a8d019ee88c9dd28 Reviewed-on: https://chromium-review.googlesource.com/425440 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251
# Copyright (c) 2014 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
    # Everything below  this is duplicated in the GN build, except Mac support.
    # If you change anything also change angle/BUILD.gn
    'variables':
    {
        'util_sources':
        [
            'com_utils.h',
            'keyboard.h',
            'geometry_utils.cpp',
            'geometry_utils.h',
            'mouse.h',
            'random_utils.cpp',
            'random_utils.h',
            'shader_utils.cpp',
            'shader_utils.h',
            'system_utils.h',
            'Event.h',
            'EGLWindow.cpp',
            'EGLWindow.h',
            'Matrix.cpp',
            'Matrix.h',
            'OSPixmap.h',
            'OSWindow.cpp',
            'OSWindow.h',
            'Timer.h',
        ],
        'util_win32_sources':
        [
            'windows/win32/Win32_system_utils.cpp',
            'windows/win32/Win32Pixmap.cpp',
            'windows/win32/Win32Pixmap.h',
            'windows/win32/Win32Window.cpp',
            'windows/win32/Win32Window.h',
            'windows/Windows_system_utils.cpp',
            'windows/WindowsTimer.cpp',
            'windows/WindowsTimer.h',
        ],
        'util_winrt_sources':
        [
            'windows/winrt/WinRT_system_utils.cpp',
            'windows/winrt/WinRTPixmap.cpp',
            'windows/winrt/WinRTWindow.cpp',
            'windows/winrt/WinRTWindow.h',
            'windows/Windows_system_utils.cpp',
            'windows/WindowsTimer.cpp',
            'windows/WindowsTimer.h',
        ],
        'util_linux_sources':
        [
            'linux/LinuxTimer.cpp',
            'linux/LinuxTimer.h',
            'posix/Posix_system_utils.cpp',
        ],
        'util_x11_sources':
        [
            'x11/X11Pixmap.cpp',
            'x11/X11Pixmap.h',
            'x11/X11Window.cpp',
            'x11/X11Window.h',
        ],
        'util_ozone_sources':
        [
            'ozone/OzonePixmap.cpp',
            'ozone/OzoneWindow.cpp',
            'ozone/OzoneWindow.h',
        ],
        'util_osx_sources':
        [
            'osx/OSXTimer.cpp',
            'osx/OSXTimer.h',
            'osx/OSXPixmap.mm',
            'osx/OSXPixmap.h',
            'osx/OSXWindow.mm',
            'osx/OSXWindow.h',
            'posix/Posix_system_utils.cpp',
        ],
        'util_android_sources':
        [
            'android/AndroidPixmap.cpp',
            'android/AndroidWindow.cpp',
            'android/AndroidWindow.h',
            'android/third_party/android_native_app_glue.c',
            'android/third_party/android_native_app_glue.h',
        ],
    },
    'targets':
    [
        {
            'target_name': 'angle_util_config',
            'type': 'none',
            'direct_dependent_settings':
            {
                'include_dirs':
                [
                    '<(angle_path)/include',
                    '<(angle_path)/util',
                ],
                'sources':
                [
                    '<@(util_sources)',
                ],
                'defines':
                [
                    'GL_GLEXT_PROTOTYPES',
                    'EGL_EGLEXT_PROTOTYPES',
                    'LIBANGLE_UTIL_IMPLEMENTATION',
                ],
                'conditions':
                [
                    ['OS=="win" and angle_build_winrt==0',
                    {
                        'sources':
                        [
                            '<@(util_win32_sources)',
                        ],
                    }],
                    ['OS=="win" and angle_build_winrt==1',
                    {
                        'sources':
                        [
                            '<@(util_winrt_sources)',
                        ],
                    }],
                    ['OS=="linux"',
                    {
                        'sources':
                        [
                            '<@(util_linux_sources)',
                        ],
                        'link_settings':
                        {
                            'libraries':
                            [
                                '-ldl',
                            ],
                        },
                    }],
                    ['use_x11==1',
                    {
                        'sources':
                        [
                            '<@(util_x11_sources)',
                        ],
                        'link_settings':
                        {
                            'ldflags':
                            [
                                '<!@(<(pkg-config) --libs-only-L --libs-only-other x11 xi)',
                            ],
                            'libraries':
                            [
                                '<!@(<(pkg-config) --libs-only-l x11 xi)',
                            ],
                        },
                    }],
                    ['use_ozone==1',
                    {
                        'sources':
                        [
                            '<@(util_ozone_sources)',
                        ],
                    }],
                    ['OS=="mac"',
                    {
                        'sources':
                        [
                            '<@(util_osx_sources)',
                        ],
                        'xcode_settings':
                        {
                            'DYLIB_INSTALL_NAME_BASE': '@rpath',
                        },
                        'link_settings':
                        {
                            'libraries':
                            [
                                '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
                                '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
                            ],
                        },
                    }],
                ],
            },
        },
        {
            'target_name': 'angle_util',
            'type': 'shared_library',
            'includes': [ '../gyp/common_defines.gypi', ],
            'dependencies':
            [
                'angle_util_config',
                '<(angle_path)/src/angle.gyp:angle_common',
                '<(angle_path)/src/angle.gyp:libEGL',
                '<(angle_path)/src/angle.gyp:libGLESv2',
            ],
            'export_dependent_settings':
            [
                '<(angle_path)/src/angle.gyp:angle_common',
            ],
            'direct_dependent_settings':
            {
                'include_dirs':
                [
                    '<(angle_path)/include',
                    '<(angle_path)/util',
                ],
                'defines':
                [
                    'GL_GLEXT_PROTOTYPES',
                    'EGL_EGLEXT_PROTOTYPES',
                ],
            },
        },
        {
            'target_name': 'angle_util_static',
            'type': 'static_library',
            'includes': [ '../gyp/common_defines.gypi', ],
            'dependencies':
            [
                'angle_util_config',
                '<(angle_path)/src/angle.gyp:angle_common',
                '<(angle_path)/src/angle.gyp:libEGL_static',
                '<(angle_path)/src/angle.gyp:libGLESv2_static',
            ],
            'export_dependent_settings':
            [
                '<(angle_path)/src/angle.gyp:angle_common',
            ],
            'direct_dependent_settings':
            {
                'include_dirs':
                [
                    '<(angle_path)/include',
                    '<(angle_path)/util',
                ],
                'defines':
                [
                    'GL_GLEXT_PROTOTYPES',
                    'EGL_EGLEXT_PROTOTYPES',
                ],
            },
        },
    ],
}