Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorstarkos <none@none>2008-12-18 20:53:57 +0300
committerstarkos <none@none>2008-12-18 20:53:57 +0300
commit59f14d3226d2563ed4432f9e92ff4a8720368939 (patch)
treeff82343bdbc2168c10e3d4bbd4685f8229cd6e68 /src/tools
parent6580121a1c98c3ee6b6ef361ccd3e26c7c487b05 (diff)
** Merged Visual Studio C# support and simplified configuration filters (r649:661)
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/csc.lua22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/tools/csc.lua b/src/tools/csc.lua
index a9908d0..8997aa4 100644
--- a/src/tools/csc.lua
+++ b/src/tools/csc.lua
@@ -27,14 +27,16 @@
-- Return the default build action for a given file, based on the file extension.
--
- function premake.csc.getbuildaction(fname)
- local ext = path.getextension(fname):lower()
- if ext == ".cs" then
+ function premake.csc.getbuildaction(fcfg)
+ local ext = path.getextension(fcfg.name):lower()
+ if fcfg.buildaction == "Compile" or ext == ".cs" then
return "Compile"
- elseif ext == ".resx" then
- return "Embed"
- elseif ext == ".asax" or ext == ".aspx" then
- return "Copy"
+ elseif fcfg.buildaction == "Embed" or ext == ".resx" then
+ return "EmbeddedResource"
+ elseif fcfg.buildaction == "Copy" or ext == ".asax" or ext == ".aspx" then
+ return "Content"
+ else
+ return "None"
end
end
@@ -73,10 +75,10 @@
function premake.csc.getkind(cfg)
if (cfg.kind == "ConsoleApp") then
- return "exe"
+ return "Exe"
elseif (cfg.kind == "WindowedApp") then
- return "winexe"
+ return "WinExe"
elseif (cfg.kind == "SharedLib") then
- return "library"
+ return "Library"
end
end \ No newline at end of file