summaryrefslogtreecommitdiffstats
path: root/premake5.lua
diff options
context:
space:
mode:
Diffstat (limited to 'premake5.lua')
-rw-r--r--premake5.lua26
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.