iw4x-client/premake5.lua

34 lines
875 B
Lua
Raw Normal View History

-- Option to allow copying the DLL file to a custom folder after build
newoption {
trigger = "copy-to",
description = "Optional, copy the DLL to a custom folder after build, define the path here if wanted.",
value = "PATH"
}
2015-12-28 20:52:31 -05:00
solution "iw4x"
location ("./build")
configurations { "Normal" }
project "iw4x"
kind "SharedLib"
language "C++"
files { "./src/**.hpp", "./src/**.cpp" }
toolset "msc" -- only support Microsoft's compiler
2015-12-28 20:52:31 -05:00
configuration "Normal"
defines { "NDEBUG" }
flags { "Optimize", "MultiProcessorCompile", "Symbols" }
vpaths {
["Headers/*"] = "src/**.hpp",
["Sources/*"] = {"src/**.cpp"},
["Docs/*"] = {"**.txt","**.md"}
}
if _OPTIONS["copy-to"] then
saneCopyToPath = string.gsub(_OPTIONS["copy-to"] .. "\\", "\\\\", "\\")
postbuildcommands {
"copy /y \"$(TargetPath)\" \"" .. saneCopyToPath .. "\""
}
end