summaryrefslogtreecommitdiffstats
path: root/premake5.lua
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2018-10-26 17:27:45 -0400
committerGitHub <noreply@github.com>2018-10-26 17:27:45 -0400
commit56c9de0ae0f0b37d0c5f50f2b39d6c18362642bb (patch)
tree96fd5e73670631b275ea16aba8f638e0ae31ac11 /premake5.lua
parent36742ae0ad8b11e5ae6c2c0c7531b272800e5ff6 (diff)
Premake improvements (#696)
* Make CacheFileSystem dtor virtual. * Fixing problems around build.linux and windows intermediate files being placed in obj.
Diffstat (limited to 'premake5.lua')
-rw-r--r--premake5.lua24
1 files changed, 16 insertions, 8 deletions
diff --git a/premake5.lua b/premake5.lua
index 7f83c8904..b1992cc79 100644
--- a/premake5.lua
+++ b/premake5.lua
@@ -53,19 +53,15 @@ workspace "slang"
configurations { "Debug", "Release" }
platforms { "x86", "x64" }
- --filter { "system:linux" }
- -- location("build.linux")
+ if os.target() == "windows" then
+ else
+ location("build." .. os.target())
+ end
-- The output binary directory will be derived from the OS
-- and configuration options, e.g. `bin/windows-x64/debug/`
targetdir "bin/%{cfg.system}-%{cfg.platform:lower()}/%{cfg.buildcfg:lower()}"
- -- The intermediate ("object") directory will use a similar
- -- naming scheme to the output directory, but will also use
- -- the project name to avoid cases where multiple projects
- -- have source files with the same name.
- objdir "intermediate/%{cfg.system}-%{cfg.platform:lower()}/%{cfg.buildcfg:lower()}/%{prj.name}"
-
-- Statically link to the C/C++ runtime rather than create a DLL dependency.
flags { "StaticRuntime" }
@@ -199,7 +195,19 @@ function baseSlangProject(name, baseDir)
-- TODO: consider only setting this for examples, since
-- it is less relevant to other projects.
--
+
location(projectDir)
+
+ if os.target() == "windows" then
+ else
+ location "intermediate/project/%{prj.name}"
+ end
+
+ -- The intermediate ("object") directory will use a similar
+ -- naming scheme to the output directory, but will also use
+ -- the project name to avoid cases where multiple projects
+ -- have source files with the same name.
+ objdir "intermediate/%{cfg.system}-%{cfg.platform:lower()}/%{cfg.buildcfg:lower()}/%{prj.name}"
-- All of our projects are written in C++.
--