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

Former-commit-id: e9b2df26e19917355e3bbc486892f2aeead2ae0e
This commit is contained in:
Lynix 2016-05-05 23:36:34 +02:00
parent acdabbc432
commit 7e037e4d6f
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")