Build: Make every lib copy its binaries (and dependency bins) to the example/bin folder
Former-commit-id: 02571367a0af738197066d4a17446e203b389d31
This commit is contained in:
parent
a1644edf45
commit
c0b5ac2529
|
|
@ -188,6 +188,29 @@ function NazaraBuild:Execute()
|
|||
libdirs("../lib/" .. makeLibDir .. "/x64")
|
||||
targetdir("../lib/" .. makeLibDir .. "/x64")
|
||||
|
||||
-- Copy the module binaries to the example folder
|
||||
if (os.is("windows")) then
|
||||
configuration({})
|
||||
postbuildcommands({[[xcopy "%{path.translate(cfg.linktarget.relpath):sub(1, -5) .. ".dll"}" "..\..\..\examples\bin\" /E /Y]]})
|
||||
|
||||
for k,v in pairs(table.join(moduleTable.Libraries, moduleTable.DynLib)) do
|
||||
local paths = {}
|
||||
table.insert(paths, {"x32", "../extlibs/lib/common/x86/" .. v .. ".dll"})
|
||||
table.insert(paths, {"x32", "../extlibs/lib/common/x86/lib" .. v .. ".dll"})
|
||||
table.insert(paths, {"x64", "../extlibs/lib/common/x64/" .. v .. ".dll"})
|
||||
table.insert(paths, {"x64", "../extlibs/lib/common/x64/lib" .. v .. ".dll"})
|
||||
|
||||
for k,v in pairs(paths) do
|
||||
local config = v[1]
|
||||
local path = v[2]
|
||||
if (os.isfile(path)) then
|
||||
configuration(config)
|
||||
postbuildcommands({[[xcopy "%{path.translate(cfg.linktarget.relpath:sub(1, -#cfg.linktarget.name - 1) .. "../../]] .. path .. [[")}" "..\..\..\examples\bin\" /E /Y]]})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
configuration({"vs*", "x32"})
|
||||
libdirs("../extlibs/lib/msvc/x86")
|
||||
libdirs("../lib/msvc/x86")
|
||||
|
|
@ -851,7 +874,7 @@ function NazaraBuild:SetupInfoTable(infoTable)
|
|||
infoTable.ConfigurationLibraries.DebugDynamic = {}
|
||||
infoTable.ConfigurationLibraries.ReleaseDynamic = {}
|
||||
|
||||
local infos = {"Defines", "Files", "FilesExcluded", "Flags", "Includes", "Libraries"}
|
||||
local infos = {"Defines", "DynLib", "Files", "FilesExcluded", "Flags", "Includes", "Libraries"}
|
||||
for k,v in ipairs(infos) do
|
||||
infoTable[v] = {}
|
||||
infoTable["Os" .. v] = {}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,10 @@ MODULE.OsFiles.Windows = {
|
|||
"../src/Nazara/Audio/Win32/**.cpp"
|
||||
}
|
||||
|
||||
MODULE.OsDynLib.Windows = {
|
||||
"soft_oal"
|
||||
}
|
||||
|
||||
MODULE.OsFiles.Posix = {
|
||||
"../src/Nazara/Audio/Posix/**.hpp",
|
||||
"../src/Nazara/Audio/Posix/**.cpp"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
TOOL.Name = "SDK"
|
||||
|
||||
TOOL.CopyTargetToExampleDir = true
|
||||
|
||||
TOOL.Directory = "../SDK/lib"
|
||||
TOOL.Kind = "Library"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
TOOL.Name = "SDKServer"
|
||||
|
||||
TOOL.CopyTargetToExampleDir = true
|
||||
|
||||
TOOL.Directory = "../SDK/lib"
|
||||
TOOL.Kind = "Library"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue