Commit 1ce845d7 by Kenneth Russell Committed by Geoff Lang

Refactor libGLESv2.gypi to allow libANGLE to be built on all platforms.

Required pulling angle_enable_d3d{9,11} into angle.gypi and definition of angle_libangle_win_sources. Pull in those sources in BUILD.gn. Tested with local GYP build on Windows. Did not test GN build yet. BUG=angleproject:773 Change-Id: Ia3703fe4fa2bc8a1682c1fa1667ca36268b36cc7 Reviewed-on: https://chromium-review.googlesource.com/221785Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarKenneth Russell <kbr@chromium.org>
parent 2629856f
......@@ -164,6 +164,9 @@ if (is_win) {
]
libs = []
# Windows-specific sources.
sources += rebase_path(gles_gypi.angle_libangle_win_sources, ".", "src")
# Shared D3dD sources.
if (angle_enable_d3d9 || angle_enable_d3d11) {
sources += rebase_path(gles_gypi.angle_d3d_shared_sources, ".", "src")
......
......@@ -228,14 +228,6 @@
<Project>{19386E01-D811-FA3B-9F1E-122BB0C0E9F5}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\src\commit_id.vcxproj">
<Project>{3B7F5656-177F-52EE-26B3-D6A75368D0A9}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\src\copy_compiler_dll.vcxproj">
<Project>{22DC02D5-1598-943C-13E1-82185B469F81}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\src\libANGLE.vcxproj">
<Project>{CAAA04EE-A56A-43FB-D011-1A56053C070C}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
......@@ -248,6 +240,14 @@
<Project>{F8ABD31A-EC2F-A211-D514-076C763B69F9}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\src\commit_id.vcxproj">
<Project>{3B7F5656-177F-52EE-26B3-D6A75368D0A9}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\src\copy_compiler_dll.vcxproj">
<Project>{22DC02D5-1598-943C-13E1-82185B469F81}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\src\libEGL.vcxproj">
<Project>{FBAEE4F6-562A-588F-01F9-72DCABB3B061}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
......
......@@ -7,11 +7,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "All", "All.vcxproj", "{D048
{276D20F5-2943-414C-0FF6-21F4723A5CF6} = {276D20F5-2943-414C-0FF6-21F4723A5CF6}
{C15697F6-5057-016E-BD29-422971875679} = {C15697F6-5057-016E-BD29-422971875679}
{19386E01-D811-FA3B-9F1E-122BB0C0E9F5} = {19386E01-D811-FA3B-9F1E-122BB0C0E9F5}
{3B7F5656-177F-52EE-26B3-D6A75368D0A9} = {3B7F5656-177F-52EE-26B3-D6A75368D0A9}
{22DC02D5-1598-943C-13E1-82185B469F81} = {22DC02D5-1598-943C-13E1-82185B469F81}
{CAAA04EE-A56A-43FB-D011-1A56053C070C} = {CAAA04EE-A56A-43FB-D011-1A56053C070C}
{7FBD6F69-B9A4-69F1-A12B-8DACB3F8CD81} = {7FBD6F69-B9A4-69F1-A12B-8DACB3F8CD81}
{F8ABD31A-EC2F-A211-D514-076C763B69F9} = {F8ABD31A-EC2F-A211-D514-076C763B69F9}
{3B7F5656-177F-52EE-26B3-D6A75368D0A9} = {3B7F5656-177F-52EE-26B3-D6A75368D0A9}
{22DC02D5-1598-943C-13E1-82185B469F81} = {22DC02D5-1598-943C-13E1-82185B469F81}
{FBAEE4F6-562A-588F-01F9-72DCABB3B061} = {FBAEE4F6-562A-588F-01F9-72DCABB3B061}
{293E74D1-544C-D368-02A0-52F61A4D0679} = {293E74D1-544C-D368-02A0-52F61A4D0679}
{B4D06330-EED1-6F99-BCA4-2F913908C38A} = {B4D06330-EED1-6F99-BCA4-2F913908C38A}
......
......@@ -63,7 +63,7 @@
<MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;NOMINMAX;GL_APICALL=;GL_GLEXT_PROTOTYPES=;EGLAPI=;ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ &quot;d3dcompiler_46.dll&quot;, &quot;d3dcompiler_43.dll&quot; };ANGLE_ENABLE_D3D9;ANGLE_ENABLE_D3D11;ANGLE_ENABLE_PERF;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;NOMINMAX;GL_APICALL=;GL_GLEXT_PROTOTYPES=;EGLAPI=;ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ &quot;d3dcompiler_46.dll&quot;, &quot;d3dcompiler_43.dll&quot; };ANGLE_ENABLE_D3D9;ANGLE_ENABLE_D3D11;_DEBUG;ANGLE_ENABLE_PERF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<TreatWarningAsError>true</TreatWarningAsError>
......@@ -90,7 +90,7 @@
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\src;..\..\include;..\..\src\libGLESv2;$(OutDir)obj\global_intermediate\angle;C:\Program Files (x86)\Windows Kits\8.0\Include\shared;C:\Program Files (x86)\Windows Kits\8.0\Include\um;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Culture>0x0409</Culture>
<PreprocessorDefinitions>GL_APICALL=;GL_GLEXT_PROTOTYPES=;EGLAPI=;ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ &quot;d3dcompiler_46.dll&quot;, &quot;d3dcompiler_43.dll&quot; };ANGLE_ENABLE_D3D9;ANGLE_ENABLE_D3D11;ANGLE_ENABLE_PERF;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>GL_APICALL=;GL_GLEXT_PROTOTYPES=;EGLAPI=;ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ &quot;d3dcompiler_46.dll&quot;, &quot;d3dcompiler_43.dll&quot; };ANGLE_ENABLE_D3D9;ANGLE_ENABLE_D3D11;_DEBUG;ANGLE_ENABLE_PERF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
......@@ -256,6 +256,7 @@
<ClInclude Include="..\..\src\libGLESv2\BinaryStream.h"/>
<ClInclude Include="..\..\src\libGLESv2\Buffer.h"/>
<ClInclude Include="..\..\src\libGLESv2\Caps.h"/>
<ClInclude Include="..\..\src\libGLESv2\Constants.h"/>
<ClInclude Include="..\..\src\libGLESv2\Context.h"/>
<ClInclude Include="..\..\src\libGLESv2\Error.h"/>
<ClInclude Include="..\..\src\libGLESv2\Fence.h"/>
......@@ -277,7 +278,6 @@
<ClInclude Include="..\..\src\libGLESv2\VertexArray.h"/>
<ClInclude Include="..\..\src\libGLESv2\VertexAttribute.h"/>
<ClInclude Include="..\..\src\libGLESv2\angletypes.h"/>
<ClInclude Include="..\..\src\libGLESv2\constants.h"/>
<ClInclude Include="..\..\src\libGLESv2\formatutils.h"/>
<ClInclude Include="..\..\src\libGLESv2\main.h"/>
<ClInclude Include="..\..\src\libGLESv2\queryconversions.h"/>
......@@ -424,7 +424,6 @@
<ClCompile Include="..\..\src\common\mathutil.cpp"/>
<ClCompile Include="..\..\src\common\tls.cpp"/>
<ClCompile Include="..\..\src\common\utilities.cpp"/>
<ClCompile Include="..\..\src\common\win32\NativeWindow.cpp"/>
<ClCompile Include="..\..\src\libGLESv2\Buffer.cpp"/>
<ClCompile Include="..\..\src\libGLESv2\Caps.cpp"/>
<ClCompile Include="..\..\src\libGLESv2\Context.cpp"/>
......@@ -510,6 +509,7 @@
<ClCompile Include="..\..\src\libGLESv2\renderer\d3d\d3d11\SwapChain11.cpp"/>
<ClCompile Include="..\..\src\libGLESv2\renderer\d3d\d3d11\TextureStorage11.cpp"/>
<ClCompile Include="..\..\src\libGLESv2\renderer\d3d\d3d11\VertexBuffer11.cpp"/>
<ClCompile Include="..\..\src\common\win32\NativeWindow.cpp"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="commit_id.vcxproj">
......
......@@ -193,15 +193,6 @@
<Filter Include="src">
<UniqueIdentifier>{8CDEE807-BC53-E450-C8B8-4DEBB66742D4}</UniqueIdentifier>
</Filter>
<Filter Include="src\common">
<UniqueIdentifier>{2F5FD094-EF52-77F7-7AA8-4327A01BF747}</UniqueIdentifier>
</Filter>
<Filter Include="src\common\win32">
<UniqueIdentifier>{789FEF16-EFE7-512E-F91B-DF7E0D72FB79}</UniqueIdentifier>
</Filter>
<Filter Include="src">
<UniqueIdentifier>{8CDEE807-BC53-E450-C8B8-4DEBB66742D4}</UniqueIdentifier>
</Filter>
<Filter Include="src\libGLESv2">
<UniqueIdentifier>{A62A9415-2E9D-A6D2-631D-1F25A5CD626F}</UniqueIdentifier>
</Filter>
......@@ -3442,6 +3433,15 @@
<Filter Include="src">
<UniqueIdentifier>{8CDEE807-BC53-E450-C8B8-4DEBB66742D4}</UniqueIdentifier>
</Filter>
<Filter Include="src\common">
<UniqueIdentifier>{2F5FD094-EF52-77F7-7AA8-4327A01BF747}</UniqueIdentifier>
</Filter>
<Filter Include="src\common\win32">
<UniqueIdentifier>{789FEF16-EFE7-512E-F91B-DF7E0D72FB79}</UniqueIdentifier>
</Filter>
<Filter Include="src">
<UniqueIdentifier>{8CDEE807-BC53-E450-C8B8-4DEBB66742D4}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\include\EGL\egl.h">
......@@ -3540,9 +3540,6 @@
<ClInclude Include="..\..\src\common\version.h">
<Filter>src\common</Filter>
</ClInclude>
<ClCompile Include="..\..\src\common\win32\NativeWindow.cpp">
<Filter>src\common\win32</Filter>
</ClCompile>
<ClInclude Include="..\..\src\libGLESv2\BinaryStream.h">
<Filter>src\libGLESv2</Filter>
</ClInclude>
......@@ -3558,6 +3555,9 @@
<ClInclude Include="..\..\src\libGLESv2\Caps.h">
<Filter>src\libGLESv2</Filter>
</ClInclude>
<ClInclude Include="..\..\src\libGLESv2\Constants.h">
<Filter>src\libGLESv2</Filter>
</ClInclude>
<ClCompile Include="..\..\src\libGLESv2\Context.cpp">
<Filter>src\libGLESv2</Filter>
</ClCompile>
......@@ -3687,9 +3687,6 @@
<ClInclude Include="..\..\src\libGLESv2\angletypes.h">
<Filter>src\libGLESv2</Filter>
</ClInclude>
<ClInclude Include="..\..\src\libGLESv2\constants.h">
<Filter>src\libGLESv2</Filter>
</ClInclude>
<ClCompile Include="..\..\src\libGLESv2\formatutils.cpp">
<Filter>src\libGLESv2</Filter>
</ClCompile>
......@@ -4293,6 +4290,9 @@
<ClInclude Include="..\..\src\libGLESv2\renderer\d3d\d3d11\VertexBuffer11.h">
<Filter>src\libGLESv2\renderer\d3d\d3d11</Filter>
</ClInclude>
<ClCompile Include="..\..\src\common\win32\NativeWindow.cpp">
<Filter>src\common\win32</Filter>
</ClCompile>
<None Include="..\..\src\angle.gyp">
<Filter>src</Filter>
</None>
......
......@@ -13,6 +13,16 @@
'angle_id_header_base': 'commit.h',
'angle_id_header': '<(angle_gen_path)/id/<(angle_id_header_base)',
'angle_use_commit_id%': '<!(python <(angle_id_script_base) check ..)',
'angle_enable_d3d9%': 0,
'angle_enable_d3d11%': 0,
'conditions':
[
['OS=="win"',
{
'angle_enable_d3d9%': 1,
'angle_enable_d3d11%': 1,
}],
],
},
'includes':
[
......
......@@ -5,8 +5,6 @@
{
'variables':
{
'angle_enable_d3d9%': 1,
'angle_enable_d3d11%': 1,
# This file list is shared with the GN build.
'angle_libegl_sources':
[
......
......@@ -5,8 +5,6 @@
{
'variables':
{
'angle_enable_d3d9%': 1,
'angle_enable_d3d11%': 1,
# These file lists are shared with the GN build.
'angle_libangle_sources':
[
......@@ -42,7 +40,6 @@
'common/utilities.cpp',
'common/utilities.h',
'common/version.h',
'common/win32/NativeWindow.cpp',
'libGLESv2/BinaryStream.h',
'libGLESv2/Buffer.cpp',
'libGLESv2/Buffer.h',
......@@ -141,6 +138,11 @@
'third_party/systeminfo/SystemInfo.cpp',
'third_party/systeminfo/SystemInfo.h',
],
'angle_libangle_win_sources':
[
# TODO(kbr): port NativeWindow to other EGL platforms.
'common/win32/NativeWindow.cpp',
],
'angle_d3d_shared_sources':
[
'libGLESv2/renderer/d3d/BufferD3D.cpp',
......@@ -306,110 +308,115 @@
},
# Everything below this is duplicated in the GN build. If you change
# anything also change angle/BUILD.gn
'conditions':
'targets':
[
['OS=="win"',
{
'targets':
'target_name': 'libANGLE',
#TODO(jamdill/geofflang): support shared
'type': 'static_library',
'dependencies': [ 'translator', 'commit_id', ],
'includes': [ '../build/common_defines.gypi', ],
'include_dirs':
[
'.',
'../include',
'libGLESv2',
],
'sources':
[
'<@(angle_libangle_sources)',
],
'defines':
[
'GL_APICALL=',
'GL_GLEXT_PROTOTYPES=',
'EGLAPI=',
'ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ "d3dcompiler_46.dll", "d3dcompiler_43.dll" }',
],
'direct_dependent_settings':
{
'include_dirs':
[
'.',
'../include',
'libGLESv2',
],
'defines':
[
'GL_APICALL=',
'GL_GLEXT_PROTOTYPES=',
'EGLAPI=',
'ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ "d3dcompiler_46.dll", "d3dcompiler_43.dll" }',
],
},
'conditions':
[
['angle_enable_d3d9==1 or angle_enable_d3d11==1',
{
'target_name': 'libANGLE',
#TODO(jamdill/geofflang): support shared
'type': 'static_library',
'dependencies': [ 'translator', 'commit_id', 'copy_compiler_dll' ],
'includes': [ '../build/common_defines.gypi', ],
'include_dirs':
'sources':
[
'.',
'../include',
'libGLESv2',
'<@(angle_d3d_shared_sources)',
],
}],
['angle_enable_d3d9==1',
{
'sources':
[
'<@(angle_libangle_sources)',
'<@(angle_d3d9_sources)',
],
'defines':
[
'GL_APICALL=',
'GL_GLEXT_PROTOTYPES=',
'EGLAPI=',
'ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ "d3dcompiler_46.dll", "d3dcompiler_43.dll" }',
'ANGLE_ENABLE_D3D9',
],
'direct_dependent_settings':
'link_settings':
{
'include_dirs':
[
'.',
'../include',
'libGLESv2',
],
'defines':
[
'GL_APICALL=',
'GL_GLEXT_PROTOTYPES=',
'EGLAPI=',
'ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ "d3dcompiler_46.dll", "d3dcompiler_43.dll" }',
],
},
'conditions':
[
['angle_enable_d3d9==1 or angle_enable_d3d11==1',
{
'sources':
[
'<@(angle_d3d_shared_sources)',
],
}],
['angle_enable_d3d9==1',
'msvs_settings':
{
'sources':
[
'<@(angle_d3d9_sources)',
],
'defines':
[
'ANGLE_ENABLE_D3D9',
],
'link_settings':
'VCLinkerTool':
{
'msvs_settings':
{
'VCLinkerTool':
{
'AdditionalDependencies':
[
'd3d9.lib',
]
}
},
},
}],
['angle_enable_d3d11==1',
'AdditionalDependencies':
[
'd3d9.lib',
]
}
},
},
}],
['angle_enable_d3d11==1',
{
'sources':
[
'<@(angle_d3d11_sources)',
],
'defines':
[
'ANGLE_ENABLE_D3D11',
],
'link_settings':
{
'msvs_settings':
{
'sources':
[
'<@(angle_d3d11_sources)',
],
'defines':
[
'ANGLE_ENABLE_D3D11',
],
'link_settings':
'VCLinkerTool':
{
'msvs_settings':
{
'VCLinkerTool':
{
'AdditionalDependencies':
[
'dxguid.lib',
]
}
},
},
}],
'AdditionalDependencies':
[
'dxguid.lib',
]
}
},
},
}],
['OS=="win"',
{
'sources':
[
'<@(angle_libangle_win_sources)',
],
'dependencies':
[
'copy_compiler_dll'
],
'configurations':
{
'Debug':
......@@ -430,34 +437,34 @@
},
},
},
},
{
'target_name': 'libGLESv2',
'type': 'shared_library',
'dependencies': [ 'libANGLE' ],
'includes': [ '../build/common_defines.gypi', ],
'sources':
[
'libGLESv2/libGLESv2.cpp',
'libGLESv2/libGLESv2.def',
'libGLESv2/libGLESv2.rc',
],
},
{
'target_name': 'libGLESv2_static',
'type': 'static_library',
# make sure we depend on commit_id as a hard dependency, otherwise
# we will try to build the static_lib in parallel
'dependencies': [ 'libANGLE', 'commit_id' ],
'includes': [ '../build/common_defines.gypi', ],
'sources':
[
'libGLESv2/libGLESv2.cpp',
'libGLESv2/libGLESv2.rc',
],
},
}],
],
},
{
'target_name': 'libGLESv2',
'type': 'shared_library',
'dependencies': [ 'libANGLE' ],
'includes': [ '../build/common_defines.gypi', ],
'sources':
[
'libGLESv2/libGLESv2.cpp',
'libGLESv2/libGLESv2.def',
'libGLESv2/libGLESv2.rc',
],
},
{
'target_name': 'libGLESv2_static',
'type': 'static_library',
# make sure we depend on commit_id as a hard dependency, otherwise
# we will try to build the static_lib in parallel
'dependencies': [ 'libANGLE', 'commit_id' ],
'includes': [ '../build/common_defines.gypi', ],
'sources':
[
'libGLESv2/libGLESv2.cpp',
'libGLESv2/libGLESv2.rc',
],
},
],
],
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment