Skip to content

Commit

Permalink
Build script library cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kecho committed Mar 19, 2022
1 parent 6380aef commit c6279c9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
6 changes: 4 additions & 2 deletions Build/Tundra/framework.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function _G.BuildModules(sourceDir, moduleMap, extraIncludes, extraDeps)
end
end

function _G.BuildPyLib(libName, libFolder, sourceDir, includeList, moduleList, otherLibs, otherDeps)
function _G.BuildPyLib(libName, libFolder, sourceDir, includeList, moduleList, otherLibs, otherDeps, otherLibPaths)
local pythonLib = SharedLibrary {
Name = libName,
Pass = "BuildCode",
Expand All @@ -87,13 +87,14 @@ function _G.BuildPyLib(libName, libFolder, sourceDir, includeList, moduleList, o
Recursive = true
},
},
LibPaths = otherLibPaths,
IdeGenerationHints = _G.GenRootIdeHints("PyModules");
}

Default(pythonLib)
end

function _G.BuildProgram(programName, programSource, defines, sourceDir, includeList, moduleList, otherLibs)
function _G.BuildProgram(programName, programSource, defines, sourceDir, includeList, moduleList, otherLibs, otherLibPaths)
local prog = Program {
Name = programName,
Pass = "BuildCode",
Expand All @@ -114,6 +115,7 @@ function _G.BuildProgram(programName, programSource, defines, sourceDir, include
Recursive = true
},
},
LibPaths = otherLibPaths,
IdeGenerationHints = _G.GenRootIdeHints("Apps");
}

Expand Down
16 changes: 14 additions & 2 deletions Build/Tundra/units.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ local LibIncludes = {
},
{
"/usr/include/python3.9",
OpenEXRLibDir,
Config = "linux-*-*"
},
ImguiDir,
Expand Down Expand Up @@ -58,10 +59,21 @@ local Libraries = {
},
{
"pthread",
":libHalf.a",
":libIex.a",
":libIexMath.a",
":libIlmImf.a",
":libIlmImfUtil.a",
":libIlmThread.a",
":libImath.a",
Config = "linux-*-*"
}
}

local LibPaths = {
OpenEXRLibDir
}

local Binaries = {
DxcBinaryCompiler,
DxcBinaryIl,
Expand Down Expand Up @@ -202,8 +214,8 @@ local SrcDLL = "$(OBJECTDIR)$(SEP)gpu.dll"
local SrcSO = "$(OBJECTDIR)$(SEP)libgpu.so"

_G.BuildModules(SourceDir, CoalPyModuleTable, CoalPyModuleIncludes, CoalPyModuleDeps)
_G.BuildPyLib("gpu", "pymodules/gpu", SourceDir, LibIncludes, CoalPyModules, Libraries, CoalPyModuleDeps.render)
_G.BuildProgram("coalpy_tests", "tests", { "CPY_ASSERT_ENABLED=1" }, SourceDir, LibIncludes, CoalPyModules, Libraries)
_G.BuildPyLib("gpu", "pymodules/gpu", SourceDir, LibIncludes, CoalPyModules, Libraries, CoalPyModuleDeps.render, LibPaths)
_G.BuildProgram("coalpy_tests", "tests", { "CPY_ASSERT_ENABLED=1" }, SourceDir, LibIncludes, CoalPyModules, Libraries, LibPaths)
_G.DeployPyPackage("coalpy", "gpu", SrcDLL, SrcSO, Binaries, ScriptsDir)

-- Deploy PIP package
Expand Down
Binary file added External/OpenEXR/staticlib/libIlmImf.a
Binary file not shown.
Binary file added External/OpenEXR/staticlib/libIlmImfUtil.a
Binary file not shown.

0 comments on commit c6279c9

Please sign in to comment.