Build: Add an option to copy the built library to the example directory

Former-commit-id: 78618a92f864e75c1c46f478a1cfc57726188b89
This commit is contained in:
Lynix 2016-05-05 23:36:34 +02:00
parent ed3b9f9a21
commit 1e3225d1b4
2 changed files with 10 additions and 0 deletions

2
.gitignore vendored
View File

@ -1,6 +1,8 @@
# Nazara build
examples/bin/*.exe
examples/bin/*.pdb
examples/bin/*.dll
examples/bin/*.so
tests/*.exe
tests/*.pdb
lib/*

View File

@ -298,6 +298,14 @@ function NazaraBuild:Execute()
targetdir("../plugins/" .. toolTable.Name .. "/lib/" .. makeLibDir .. "/x64")
end
-- Copy the module binaries to the example folder
if (toolTable.CopyTargetToExampleDir) then
if (os.is("windows")) then
configuration({})
postbuildcommands({[[xcopy "%{path.translate(cfg.linktarget.relpath):sub(1, -5) .. ".dll"}" "..\..\..\examples\bin\" /E /Y]]})
end
end
configuration({"vs*", "x32"})
libdirs("../extlibs/lib/msvc/x86")
libdirs("../lib/msvc/x86")