diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2020-07-31 16:31:30 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-31 13:31:30 -0700 |
| commit | 4549597709e29b85b5f95503f4f2258c16db12be (patch) | |
| tree | ef9dd57c9975e928950e0289e017bf622bea9298 /premake5.lua | |
| parent | fc8b5758ca7a9b3aaf2f93d45ff570fab2a68bb8 (diff) | |
Upgrade to Glslang 11.0.0 (#1466)
* Fix premake5.lua so it uses the new path needed for OpenCLDebugInfo100.h
* Keep including the includes directory.
* Added the spirv-tools-generated files.
* We don't need to include the spirv/unified1 path because the files needed are actually in the spirv-tools-generated folder.
* Put the build_info.h glslang generated files in external/glslang-generated. Alter premake5.lua to pick up that header.
* First pass at documenting how to build glslang and spirv-tools.
* Improved glsl/spir-v tools README.md
* Added revision.h
* Change how gResources is calculated.
Update about revision.h
* Update docs a little.
* Split out spirv-tools into a separate project for building glslang. This was not necessary on linux, but *is* necessary on windows, because there is a file disassemble.cpp in spirv-tools and in glslang, and this leads to VS choosing only one. With the separate library, the problem is resolved.
* Fix direct-spirv-emit output.
* Update to latest version of spirv headers and spirv-tools.
* Upgrade submodule version of glslang in external.
* Add fPIC to build options of slang-spirv-tools
* Upgrade slang-binaries to have new glslang.
* Fix issues with Windows slang-glslang binaries, via update of slang-binaries used.
* Small improvements to glslang building process documentation.
Co-authored-by: Tim Foley <tfoleyNV@users.noreply.github.com>
Diffstat (limited to 'premake5.lua')
| -rw-r--r-- | premake5.lua | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/premake5.lua b/premake5.lua index 869ce0532..49aa47a35 100644 --- a/premake5.lua +++ b/premake5.lua @@ -956,6 +956,20 @@ end if buildGlslang then +standardProject "slang-spirv-tools" + uuid "C36F6185-49B3-467E-8388-D0E9BF5F7BB8" + kind "StaticLib" + includedirs { "external/spirv-tools", "external/spirv-tools/include", "external/spirv-headers/include", "external/spirv-tools-generated"} + + addSourceDir("external/spirv-tools/source") + addSourceDir("external/spirv-tools/source/opt") + addSourceDir("external/spirv-tools/source/util") + addSourceDir("external/spirv-tools/source/val") + + filter { "system:linux or macosx" } + links { "dl", "pthread" } + buildoptions{"-fPIC", "-pthread"} + -- -- The single most complicated part of our build is our custom version of glslang. -- Is not really set up to produce a shared library with a usable API, so we have @@ -971,7 +985,7 @@ if buildGlslang then standardProject "slang-glslang" uuid "C495878A-832C-485B-B347-0998A90CC936" kind "SharedLib" - includedirs { "external/glslang", "external/spirv-tools", "external/spirv-tools/include", "external/spirv-headers/include", "external/spirv-tools-generated" } + includedirs { "external/glslang", "external/spirv-tools", "external/spirv-tools/include", "external/spirv-headers/include", "external/spirv-tools-generated", "external/glslang-generated" } defines { @@ -995,11 +1009,7 @@ standardProject "slang-glslang" addSourceDir("external/glslang/OGLCompilersDLL") addSourceDir("external/glslang/SPIRV") addSourceDir("external/glslang/StandAlone") - addSourceDir("external/spirv-tools/source") - addSourceDir("external/spirv-tools/source/opt") - addSourceDir("external/spirv-tools/source/util") - addSourceDir("external/spirv-tools/source/val") - + -- Unfortunately, blindly adding files like that also pulled in a declaration -- of a main entry point that we do *not* want, so we will specifically -- exclude that file from our build. @@ -1010,6 +1020,8 @@ standardProject "slang-glslang" -- don't really care about *any* of that, but we can't remove it from the -- build so we need to include the appropriate platform-specific sources. + links { "slang-spirv-tools" } + filter { "system:windows" } -- On Windows we need to add the platform-specific sources and then -- remove the `main.cpp` file since it tries to define a `DllMain` @@ -1022,6 +1034,8 @@ standardProject "slang-glslang" addSourceDir("external/glslang/glslang/OSDependent/Unix") buildoptions{"-fPIC", "-pthread"} + + -- -- With glslang's build out of the way, we've now covered everything we have -- to build to get Slang and its tools/examples built. |
