summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2019-11-14 11:03:02 -0800
committerGitHub <noreply@github.com>2019-11-14 11:03:02 -0800
commitd631233f4fcc2e41a9e7d7e0d3e277c90c81582b (patch)
tree67a8667fac7fd2ce46ac9d04240ec6a2b07989c1 /source
parent2e2f9877afc8fe0ec09ff6e546f2f74801d1266d (diff)
Enable use of pre-built glslang binaries (#1120)
* Enable use of pre-built glslang binaries This change uses an updated version of the `slang-binaries` submodule that includes pre-built versions of `slang-glslang.dll` and `libslang-glslang.so`, and enables the build of the main Slang project to rely on these binaries instead of building them from source. An option to the premake build file can be used to generate the appropriate project files for `slang-glslang`, which should enable us to build updated binaries as needed. The default option is to *not* build those projects, so that we can reduce build times in the common case (and on CI). * fixup: different copy commands per platform * fixup * fixup * fixup: remove stray line added to premake file by accident
Diffstat (limited to 'source')
-rw-r--r--source/core/core.vcxproj4
-rw-r--r--source/core/core.vcxproj.filters4
-rw-r--r--source/slang/slang.vcxproj26
-rw-r--r--source/slang/slang.vcxproj.filters90
4 files changed, 67 insertions, 57 deletions
diff --git a/source/core/core.vcxproj b/source/core/core.vcxproj
index 5b42dc81b..e0cc33569 100644
--- a/source/core/core.vcxproj
+++ b/source/core/core.vcxproj
@@ -241,9 +241,7 @@
<ClCompile Include="windows\slang-win-visual-studio-util.cpp" />
</ItemGroup>
<ItemGroup>
- <Natvis Include="core.natvis">
- <FileType>Document</FileType>
- </Natvis>
+ <Natvis Include="core.natvis" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
diff --git a/source/core/core.vcxproj.filters b/source/core/core.vcxproj.filters
index 8184637f2..6042a1c22 100644
--- a/source/core/core.vcxproj.filters
+++ b/source/core/core.vcxproj.filters
@@ -214,8 +214,8 @@
</ClCompile>
</ItemGroup>
<ItemGroup>
- <None Include="core.natvis">
+ <Natvis Include="core.natvis">
<Filter>Source Files</Filter>
- </None>
+ </Natvis>
</ItemGroup>
</Project> \ No newline at end of file
diff --git a/source/slang/slang.vcxproj b/source/slang/slang.vcxproj
index bc129a2c6..9b2b4d7ea 100644
--- a/source/slang/slang.vcxproj
+++ b/source/slang/slang.vcxproj
@@ -109,6 +109,9 @@
<ImportLibrary>..\..\bin\windows-x86\debug\slang.lib</ImportLibrary>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
+ <PostBuildEvent>
+ <Command>IF EXIST ..\..\external\slang-binaries\bin\windows-x86\slang-glslang.dll\ (xcopy /Q /E /Y /I ..\..\external\slang-binaries\bin\windows-x86\slang-glslang.dll ..\..\bin\windows-x86\debug &gt; nul) ELSE (xcopy /Q /Y /I ..\..\external\slang-binaries\bin\windows-x86\slang-glslang.dll ..\..\bin\windows-x86\debug &gt; nul)</Command>
+ </PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
@@ -126,6 +129,9 @@
<ImportLibrary>..\..\bin\windows-x64\debug\slang.lib</ImportLibrary>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
+ <PostBuildEvent>
+ <Command>IF EXIST ..\..\external\slang-binaries\bin\windows-x64\slang-glslang.dll\ (xcopy /Q /E /Y /I ..\..\external\slang-binaries\bin\windows-x64\slang-glslang.dll ..\..\bin\windows-x64\debug &gt; nul) ELSE (xcopy /Q /Y /I ..\..\external\slang-binaries\bin\windows-x64\slang-glslang.dll ..\..\bin\windows-x64\debug &gt; nul)</Command>
+ </PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
@@ -147,6 +153,9 @@
<ImportLibrary>..\..\bin\windows-x86\release\slang.lib</ImportLibrary>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
+ <PostBuildEvent>
+ <Command>IF EXIST ..\..\external\slang-binaries\bin\windows-x86\slang-glslang.dll\ (xcopy /Q /E /Y /I ..\..\external\slang-binaries\bin\windows-x86\slang-glslang.dll ..\..\bin\windows-x86\release &gt; nul) ELSE (xcopy /Q /Y /I ..\..\external\slang-binaries\bin\windows-x86\slang-glslang.dll ..\..\bin\windows-x86\release &gt; nul)</Command>
+ </PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
@@ -168,6 +177,9 @@
<ImportLibrary>..\..\bin\windows-x64\release\slang.lib</ImportLibrary>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
+ <PostBuildEvent>
+ <Command>IF EXIST ..\..\external\slang-binaries\bin\windows-x64\slang-glslang.dll\ (xcopy /Q /E /Y /I ..\..\external\slang-binaries\bin\windows-x64\slang-glslang.dll ..\..\bin\windows-x64\release &gt; nul) ELSE (xcopy /Q /Y /I ..\..\external\slang-binaries\bin\windows-x64\slang-glslang.dll ..\..\bin\windows-x64\release &gt; nul)</Command>
+ </PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\..\slang.h" />
@@ -312,19 +324,13 @@
<ClCompile Include="slang.cpp" />
</ItemGroup>
<ItemGroup>
- <Natvis Include="..\core\core.natvis" />
- <Natvis Include="slang.natvis">
- <FileType>Document</FileType>
- </Natvis>
- </ItemGroup>
- <ItemGroup>
<CustomBuild Include="core.meta.slang">
<FileType>Document</FileType>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"../../bin/windows-x86/debug/slang-generate" %(Identity)</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"../../bin/windows-x64/debug/slang-generate" %(Identity)</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"../../bin/windows-x86/release/slang-generate" %(Identity)</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"../../bin/windows-x64/release/slang-generate" %(Identity)</Command>
- <Outputs>%(Identity).h</Outputs>
+ <Outputs>../../core.meta.slang.h</Outputs>
<Message>slang-generate %(Identity)</Message>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../bin/windows-x86/debug/slang-generate.exe</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">../../bin/windows-x64/debug/slang-generate.exe</AdditionalInputs>
@@ -337,7 +343,7 @@
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"../../bin/windows-x64/debug/slang-generate" %(Identity)</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"../../bin/windows-x86/release/slang-generate" %(Identity)</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"../../bin/windows-x64/release/slang-generate" %(Identity)</Command>
- <Outputs>%(Identity).h</Outputs>
+ <Outputs>../../hlsl.meta.slang.h</Outputs>
<Message>slang-generate %(Identity)</Message>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../bin/windows-x86/debug/slang-generate.exe</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">../../bin/windows-x64/debug/slang-generate.exe</AdditionalInputs>
@@ -346,6 +352,10 @@
</CustomBuild>
</ItemGroup>
<ItemGroup>
+ <Natvis Include="..\core\core.natvis" />
+ <Natvis Include="slang.natvis" />
+ </ItemGroup>
+ <ItemGroup>
<ProjectReference Include="..\core\core.vcxproj">
<Project>{F9BE7957-8399-899E-0C49-E714FDDD4B65}</Project>
</ProjectReference>
diff --git a/source/slang/slang.vcxproj.filters b/source/slang/slang.vcxproj.filters
index 943ce8281..b2c045fa8 100644
--- a/source/slang/slang.vcxproj.filters
+++ b/source/slang/slang.vcxproj.filters
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Header Files">
@@ -21,6 +21,9 @@
<ClInclude Include="hlsl.meta.slang.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="slang-check-impl.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
<ClInclude Include="slang-check.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -123,6 +126,9 @@
<ClInclude Include="slang-ir-ssa.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="slang-ir-strip.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
<ClInclude Include="slang-ir-union.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -162,6 +168,9 @@
<ClInclude Include="slang-object-meta-end.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="slang-options.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
<ClInclude Include="slang-parameter-binding.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -219,17 +228,38 @@
<ClInclude Include="slang-visitor.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="slang-ir-strip.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="slang-check-impl.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="slang-options.h">
- <Filter>Header Files</Filter>
- </ClInclude>
</ItemGroup>
<ItemGroup>
+ <ClCompile Include="slang-check-conformance.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="slang-check-constraint.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="slang-check-conversion.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="slang-check-decl.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="slang-check-expr.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="slang-check-modifier.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="slang-check-overload.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="slang-check-shader.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="slang-check-stmt.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="slang-check-type.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
<ClCompile Include="slang-check.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -320,6 +350,9 @@
<ClCompile Include="slang-ir-ssa.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="slang-ir-strip.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
<ClCompile Include="slang-ir-union.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -392,39 +425,6 @@
<ClCompile Include="slang.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="slang-ir-strip.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="slang-check-expr.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="slang-check-stmt.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="slang-check-decl.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="slang-check-type.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="slang-check-shader.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="slang-check-modifier.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="slang-check-constraint.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="slang-check-conformance.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="slang-check-overload.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="slang-check-conversion.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="core.meta.slang">
@@ -438,6 +438,8 @@
<Natvis Include="..\core\core.natvis">
<Filter>Source Files</Filter>
</Natvis>
- <Natvis Include="slang.natvis" />
+ <Natvis Include="slang.natvis">
+ <Filter>Source Files</Filter>
+ </Natvis>
</ItemGroup>
</Project> \ No newline at end of file