--copy-to option for premake5 to define custom folder to copy iw4x.dll to after build.
This commit is contained in:
parent
8b81fe37ae
commit
77df2fcae8
13
premake5.lua
13
premake5.lua
@ -1,3 +1,9 @@
|
|||||||
|
-- Option to allow copying the DLL file to a custom folder after build
|
||||||
|
newoption {
|
||||||
|
trigger = "copy-to",
|
||||||
|
description = "Optionally copy the DLL to a custom folder after build, define the path here if wanted."
|
||||||
|
}
|
||||||
|
|
||||||
solution "iw4x"
|
solution "iw4x"
|
||||||
location ("./build")
|
location ("./build")
|
||||||
configurations { "Normal" }
|
configurations { "Normal" }
|
||||||
@ -11,3 +17,10 @@ solution "iw4x"
|
|||||||
configuration "Normal"
|
configuration "Normal"
|
||||||
defines { "NDEBUG" }
|
defines { "NDEBUG" }
|
||||||
flags { "Optimize", "MultiProcessorCompile", "Symbols" }
|
flags { "Optimize", "MultiProcessorCompile", "Symbols" }
|
||||||
|
|
||||||
|
if _OPTIONS["copy-to"] then
|
||||||
|
saneCopyToPath = string.gsub(_OPTIONS["copy-to"] .. "\\", "\\\\", "\\")
|
||||||
|
postbuildcommands {
|
||||||
|
"copy /y \"$(TargetPath)\" \"" .. saneCopyToPath .. "\""
|
||||||
|
}
|
||||||
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user