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) { ...@@ -164,6 +164,9 @@ if (is_win) {
] ]
libs = [] libs = []
# Windows-specific sources.
sources += rebase_path(gles_gypi.angle_libangle_win_sources, ".", "src")
# Shared D3dD sources. # Shared D3dD sources.
if (angle_enable_d3d9 || angle_enable_d3d11) { if (angle_enable_d3d9 || angle_enable_d3d11) {
sources += rebase_path(gles_gypi.angle_d3d_shared_sources, ".", "src") sources += rebase_path(gles_gypi.angle_d3d_shared_sources, ".", "src")
......
...@@ -228,14 +228,6 @@ ...@@ -228,14 +228,6 @@
<Project>{19386E01-D811-FA3B-9F1E-122BB0C0E9F5}</Project> <Project>{19386E01-D811-FA3B-9F1E-122BB0C0E9F5}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly> <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference> </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"> <ProjectReference Include="..\src\libANGLE.vcxproj">
<Project>{CAAA04EE-A56A-43FB-D011-1A56053C070C}</Project> <Project>{CAAA04EE-A56A-43FB-D011-1A56053C070C}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly> <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
...@@ -248,6 +240,14 @@ ...@@ -248,6 +240,14 @@
<Project>{F8ABD31A-EC2F-A211-D514-076C763B69F9}</Project> <Project>{F8ABD31A-EC2F-A211-D514-076C763B69F9}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly> <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference> </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"> <ProjectReference Include="..\src\libEGL.vcxproj">
<Project>{FBAEE4F6-562A-588F-01F9-72DCABB3B061}</Project> <Project>{FBAEE4F6-562A-588F-01F9-72DCABB3B061}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly> <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
......
...@@ -7,11 +7,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "All", "All.vcxproj", "{D048 ...@@ -7,11 +7,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "All", "All.vcxproj", "{D048
{276D20F5-2943-414C-0FF6-21F4723A5CF6} = {276D20F5-2943-414C-0FF6-21F4723A5CF6} {276D20F5-2943-414C-0FF6-21F4723A5CF6} = {276D20F5-2943-414C-0FF6-21F4723A5CF6}
{C15697F6-5057-016E-BD29-422971875679} = {C15697F6-5057-016E-BD29-422971875679} {C15697F6-5057-016E-BD29-422971875679} = {C15697F6-5057-016E-BD29-422971875679}
{19386E01-D811-FA3B-9F1E-122BB0C0E9F5} = {19386E01-D811-FA3B-9F1E-122BB0C0E9F5} {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} {CAAA04EE-A56A-43FB-D011-1A56053C070C} = {CAAA04EE-A56A-43FB-D011-1A56053C070C}
{7FBD6F69-B9A4-69F1-A12B-8DACB3F8CD81} = {7FBD6F69-B9A4-69F1-A12B-8DACB3F8CD81} {7FBD6F69-B9A4-69F1-A12B-8DACB3F8CD81} = {7FBD6F69-B9A4-69F1-A12B-8DACB3F8CD81}
{F8ABD31A-EC2F-A211-D514-076C763B69F9} = {F8ABD31A-EC2F-A211-D514-076C763B69F9} {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} {FBAEE4F6-562A-588F-01F9-72DCABB3B061} = {FBAEE4F6-562A-588F-01F9-72DCABB3B061}
{293E74D1-544C-D368-02A0-52F61A4D0679} = {293E74D1-544C-D368-02A0-52F61A4D0679} {293E74D1-544C-D368-02A0-52F61A4D0679} = {293E74D1-544C-D368-02A0-52F61A4D0679}
{B4D06330-EED1-6F99-BCA4-2F913908C38A} = {B4D06330-EED1-6F99-BCA4-2F913908C38A} {B4D06330-EED1-6F99-BCA4-2F913908C38A} = {B4D06330-EED1-6F99-BCA4-2F913908C38A}
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PrecompiledHeader>NotUsing</PrecompiledHeader> <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> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo> <RuntimeTypeInfo>true</RuntimeTypeInfo>
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
<ResourceCompile> <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> <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> <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> </ResourceCompile>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
...@@ -256,6 +256,7 @@ ...@@ -256,6 +256,7 @@
<ClInclude Include="..\..\src\libGLESv2\BinaryStream.h"/> <ClInclude Include="..\..\src\libGLESv2\BinaryStream.h"/>
<ClInclude Include="..\..\src\libGLESv2\Buffer.h"/> <ClInclude Include="..\..\src\libGLESv2\Buffer.h"/>
<ClInclude Include="..\..\src\libGLESv2\Caps.h"/> <ClInclude Include="..\..\src\libGLESv2\Caps.h"/>
<ClInclude Include="..\..\src\libGLESv2\Constants.h"/>
<ClInclude Include="..\..\src\libGLESv2\Context.h"/> <ClInclude Include="..\..\src\libGLESv2\Context.h"/>
<ClInclude Include="..\..\src\libGLESv2\Error.h"/> <ClInclude Include="..\..\src\libGLESv2\Error.h"/>
<ClInclude Include="..\..\src\libGLESv2\Fence.h"/> <ClInclude Include="..\..\src\libGLESv2\Fence.h"/>
...@@ -277,7 +278,6 @@ ...@@ -277,7 +278,6 @@
<ClInclude Include="..\..\src\libGLESv2\VertexArray.h"/> <ClInclude Include="..\..\src\libGLESv2\VertexArray.h"/>
<ClInclude Include="..\..\src\libGLESv2\VertexAttribute.h"/> <ClInclude Include="..\..\src\libGLESv2\VertexAttribute.h"/>
<ClInclude Include="..\..\src\libGLESv2\angletypes.h"/> <ClInclude Include="..\..\src\libGLESv2\angletypes.h"/>
<ClInclude Include="..\..\src\libGLESv2\constants.h"/>
<ClInclude Include="..\..\src\libGLESv2\formatutils.h"/> <ClInclude Include="..\..\src\libGLESv2\formatutils.h"/>
<ClInclude Include="..\..\src\libGLESv2\main.h"/> <ClInclude Include="..\..\src\libGLESv2\main.h"/>
<ClInclude Include="..\..\src\libGLESv2\queryconversions.h"/> <ClInclude Include="..\..\src\libGLESv2\queryconversions.h"/>
...@@ -424,7 +424,6 @@ ...@@ -424,7 +424,6 @@
<ClCompile Include="..\..\src\common\mathutil.cpp"/> <ClCompile Include="..\..\src\common\mathutil.cpp"/>
<ClCompile Include="..\..\src\common\tls.cpp"/> <ClCompile Include="..\..\src\common\tls.cpp"/>
<ClCompile Include="..\..\src\common\utilities.cpp"/> <ClCompile Include="..\..\src\common\utilities.cpp"/>
<ClCompile Include="..\..\src\common\win32\NativeWindow.cpp"/>
<ClCompile Include="..\..\src\libGLESv2\Buffer.cpp"/> <ClCompile Include="..\..\src\libGLESv2\Buffer.cpp"/>
<ClCompile Include="..\..\src\libGLESv2\Caps.cpp"/> <ClCompile Include="..\..\src\libGLESv2\Caps.cpp"/>
<ClCompile Include="..\..\src\libGLESv2\Context.cpp"/> <ClCompile Include="..\..\src\libGLESv2\Context.cpp"/>
...@@ -510,6 +509,7 @@ ...@@ -510,6 +509,7 @@
<ClCompile Include="..\..\src\libGLESv2\renderer\d3d\d3d11\SwapChain11.cpp"/> <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\TextureStorage11.cpp"/>
<ClCompile Include="..\..\src\libGLESv2\renderer\d3d\d3d11\VertexBuffer11.cpp"/> <ClCompile Include="..\..\src\libGLESv2\renderer\d3d\d3d11\VertexBuffer11.cpp"/>
<ClCompile Include="..\..\src\common\win32\NativeWindow.cpp"/>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="commit_id.vcxproj"> <ProjectReference Include="commit_id.vcxproj">
......
...@@ -193,15 +193,6 @@ ...@@ -193,15 +193,6 @@
<Filter Include="src"> <Filter Include="src">
<UniqueIdentifier>{8CDEE807-BC53-E450-C8B8-4DEBB66742D4}</UniqueIdentifier> <UniqueIdentifier>{8CDEE807-BC53-E450-C8B8-4DEBB66742D4}</UniqueIdentifier>
</Filter> </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"> <Filter Include="src\libGLESv2">
<UniqueIdentifier>{A62A9415-2E9D-A6D2-631D-1F25A5CD626F}</UniqueIdentifier> <UniqueIdentifier>{A62A9415-2E9D-A6D2-631D-1F25A5CD626F}</UniqueIdentifier>
</Filter> </Filter>
...@@ -3442,6 +3433,15 @@ ...@@ -3442,6 +3433,15 @@
<Filter Include="src"> <Filter Include="src">
<UniqueIdentifier>{8CDEE807-BC53-E450-C8B8-4DEBB66742D4}</UniqueIdentifier> <UniqueIdentifier>{8CDEE807-BC53-E450-C8B8-4DEBB66742D4}</UniqueIdentifier>
</Filter> </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>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\..\include\EGL\egl.h"> <ClInclude Include="..\..\include\EGL\egl.h">
...@@ -3540,9 +3540,6 @@ ...@@ -3540,9 +3540,6 @@
<ClInclude Include="..\..\src\common\version.h"> <ClInclude Include="..\..\src\common\version.h">
<Filter>src\common</Filter> <Filter>src\common</Filter>
</ClInclude> </ClInclude>
<ClCompile Include="..\..\src\common\win32\NativeWindow.cpp">
<Filter>src\common\win32</Filter>
</ClCompile>
<ClInclude Include="..\..\src\libGLESv2\BinaryStream.h"> <ClInclude Include="..\..\src\libGLESv2\BinaryStream.h">
<Filter>src\libGLESv2</Filter> <Filter>src\libGLESv2</Filter>
</ClInclude> </ClInclude>
...@@ -3558,6 +3555,9 @@ ...@@ -3558,6 +3555,9 @@
<ClInclude Include="..\..\src\libGLESv2\Caps.h"> <ClInclude Include="..\..\src\libGLESv2\Caps.h">
<Filter>src\libGLESv2</Filter> <Filter>src\libGLESv2</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\src\libGLESv2\Constants.h">
<Filter>src\libGLESv2</Filter>
</ClInclude>
<ClCompile Include="..\..\src\libGLESv2\Context.cpp"> <ClCompile Include="..\..\src\libGLESv2\Context.cpp">
<Filter>src\libGLESv2</Filter> <Filter>src\libGLESv2</Filter>
</ClCompile> </ClCompile>
...@@ -3687,9 +3687,6 @@ ...@@ -3687,9 +3687,6 @@
<ClInclude Include="..\..\src\libGLESv2\angletypes.h"> <ClInclude Include="..\..\src\libGLESv2\angletypes.h">
<Filter>src\libGLESv2</Filter> <Filter>src\libGLESv2</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\src\libGLESv2\constants.h">
<Filter>src\libGLESv2</Filter>
</ClInclude>
<ClCompile Include="..\..\src\libGLESv2\formatutils.cpp"> <ClCompile Include="..\..\src\libGLESv2\formatutils.cpp">
<Filter>src\libGLESv2</Filter> <Filter>src\libGLESv2</Filter>
</ClCompile> </ClCompile>
...@@ -4293,6 +4290,9 @@ ...@@ -4293,6 +4290,9 @@
<ClInclude Include="..\..\src\libGLESv2\renderer\d3d\d3d11\VertexBuffer11.h"> <ClInclude Include="..\..\src\libGLESv2\renderer\d3d\d3d11\VertexBuffer11.h">
<Filter>src\libGLESv2\renderer\d3d\d3d11</Filter> <Filter>src\libGLESv2\renderer\d3d\d3d11</Filter>
</ClInclude> </ClInclude>
<ClCompile Include="..\..\src\common\win32\NativeWindow.cpp">
<Filter>src\common\win32</Filter>
</ClCompile>
<None Include="..\..\src\angle.gyp"> <None Include="..\..\src\angle.gyp">
<Filter>src</Filter> <Filter>src</Filter>
</None> </None>
......
...@@ -13,6 +13,16 @@ ...@@ -13,6 +13,16 @@
'angle_id_header_base': 'commit.h', 'angle_id_header_base': 'commit.h',
'angle_id_header': '<(angle_gen_path)/id/<(angle_id_header_base)', 'angle_id_header': '<(angle_gen_path)/id/<(angle_id_header_base)',
'angle_use_commit_id%': '<!(python <(angle_id_script_base) check ..)', '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': 'includes':
[ [
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
{ {
'variables': 'variables':
{ {
'angle_enable_d3d9%': 1,
'angle_enable_d3d11%': 1,
# This file list is shared with the GN build. # This file list is shared with the GN build.
'angle_libegl_sources': 'angle_libegl_sources':
[ [
......
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