diff options
author | Oliver Schneider <oliver@assarbad.net> | 2014-01-20 05:44:48 +0400 |
---|---|---|
committer | Oliver Schneider <oliver@assarbad.net> | 2014-01-20 05:44:48 +0400 |
commit | 7dc3060452e975d54d3a412ee5c8646bb74dec5f (patch) | |
tree | 91d5bce70d03d5da4876db8c039c604e85f7a0b5 | |
parent | 320e4cf19ef4bb7f33162e7477a7f373dcc66e29 (diff) |
Preparing for creation of separate (public) release build solution and project
-rw-r--r-- | 3rdparty/lua/premake4.lua | 11 | ||||
-rw-r--r-- | premake4.lua | 18 |
2 files changed, 19 insertions, 10 deletions
diff --git a/3rdparty/lua/premake4.lua b/3rdparty/lua/premake4.lua index 7e0bf52..7dacd2a 100644 --- a/3rdparty/lua/premake4.lua +++ b/3rdparty/lua/premake4.lua @@ -102,7 +102,8 @@ local function fmt(msg, ...) return string.format(msg, unpack(arg))
end
-function create_luajit_projects(basedir)
+function create_luajit_projects(basedir, pfx)
+ local pfx = iif(pfx, pfx, "")
local bd = ""
local offs = "" -- relative path, calculated based on slashes and backslashes in bd (basedir after normalization)
if basedir ~= nil then
@@ -113,7 +114,7 @@ function create_luajit_projects(basedir) local int_dir = fmt("intermediate\\%s_$(%s)_$(%s)\\$(ProjectName)", action, transformMN("Platform"), transformMN("Configuration"))
local inc_dir = fmt("intermediate\\%s_$(%s)", action, transformMN("Platform"))
-- Single minilua for all configurations and platforms
- project ("minilua") -- required to build LuaJIT
+ project (pfx.."minilua") -- required to build LuaJIT
uuid ("531911BC-0023-4EC6-A2CE-6C3F5C182647")
language ("C")
kind ("ConsoleApp")
@@ -127,7 +128,7 @@ function create_luajit_projects(basedir) defines {"NDEBUG", "_CRT_SECURE_NO_DEPRECATE"}
vpaths {["Header Files/*"] = { bd.."src/host/*.h" }, ["Source Files/*"] = { bd.."src/host/*.c" },}
files {bd.."src/host/minilua.c"}
- project ("buildvm") -- required to build LuaJIT
+ project (pfx.."buildvm") -- required to build LuaJIT
uuid ("F949C208-7A2E-4B1C-B74D-956E88542A26")
language ("C")
kind ("ConsoleApp")
@@ -150,7 +151,7 @@ function create_luajit_projects(basedir) prebuildcommands(fmt("if not exist \"%s..\\%s\" md \"%s..\\%s\"", offs, inc_dir, offs, inc_dir))
prebuildcommands(fmt("minilua ..\\dynasm\\dynasm.lua -LN -D WIN -D JIT -D FFI%s -o \"%s..\\%s\\buildvm_arch.h\" vm_x86.dasc", prebuild_table[k], offs, inc_dir))
end
- project ("luajit2") -- actual LuaJIT2 static lib
+ project (pfx.."luajit2") -- actual LuaJIT2 static lib
uuid ("9F35C2BB-DF1E-400A-A829-AE34E1C91A70")
language ("C")
kind ("StaticLib")
@@ -181,7 +182,7 @@ function create_luajit_projects(basedir) prebuildcommands(fmt("buildvm%d -m folddef -o \"%s..\\%s\\lj_folddef.h\" lj_opt_fold.c", k, offs, inc_dir))
end
if standalone then
- project ("lua") -- actual Lua executable that statically links LuaJIT2
+ project (pfx.."lua") -- actual Lua executable that statically links LuaJIT2
uuid ("3A806ACF-62B5-4597-B934-ED2F98A4F115")
language ("C")
kind ("ConsoleApp")
diff --git a/premake4.lua b/premake4.lua index 8cff11b..984ff36 100644 --- a/premake4.lua +++ b/premake4.lua @@ -101,16 +101,24 @@ local function transformMN(input) -- transform the macro names for older Visual end
local function inc(inc_dir)
include(inc_dir)
- create_luajit_projects(inc_dir)
+ create_luajit_projects(inc_dir, "wds_release_")
end
newoption { trigger = "resources", description = "Also create projects for the resource DLLs." }
newoption { trigger = "sdk71", description = "Applies to VS 2005 and 2008. If you have the Windows 7 SP1\n SDK, use this to create projects for a feature-complete\n WinDirStat." }
+newoption { trigger = "release", description = "Creates a solution suitable for a release build." }
if _OPTIONS["resources"] then
print "INFO: Creating projects for resource DLLs."
end
+local release = false
+if _OPTIONS["release"] then
+ print "INFO: Creating release build solution."
+ _OPTIONS["resources"] = ""
+ _OPTIONS["sdk71"] = ""
+ release = true
+end
-solution ("windirstat")
- configurations {"Debug", "Release"}
+solution (iif(release, "wds_release", "windirstat"))
+ configurations (iif(release, {"Release"}, {"Debug", "Release"}))
platforms {"x32", "x64"}
location ('.')
@@ -118,7 +126,7 @@ solution ("windirstat") inc("3rdparty\\lua")
-- Main WinDirStat project
- project ("windirstat")
+ project (iif(release, "wds_release", "windirstat"))
local int_dir = "intermediate/" .. action .. "_$(" .. transformMN("Platform") .. ")_$(" .. transformMN("Configuration") .. ")\\$(ProjectName)"
uuid ("BD11B94C-6594-4477-9FDF-2E24447D1F14")
language ("C++")
@@ -235,7 +243,7 @@ solution ("windirstat") }
for nm,guid in pairs(resource_dlls) do
premake.CurrentContainer = oldcurr
- prj = project(nm)
+ prj = project(iif(release, "wds_release_" .. nm, nm))
local int_dir = "intermediate/" .. action .. "_$(ProjectName)_" .. nm
uuid (guid)
language ("C++")
|