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