Initial commit - https://www.youtube.com/watch?v=_riranMmtvI&list=PL8327DO66nu9qYVKLDmdLW_84-yE4auCR&index=3
This commit is contained in:
35
buildscripts/configure.lua
Normal file
35
buildscripts/configure.lua
Normal file
@@ -0,0 +1,35 @@
|
||||
local function download_requirements()
|
||||
-- Git module is not yet implemented, so delegate to the command-line
|
||||
local argv = {
|
||||
{"clone https://github.com/glfw/glfw.git thirdparty/glfw"}
|
||||
}
|
||||
local ec, stdout, stderr = platform.exec_parallel("git", 1, argv)
|
||||
for i,ec in pairs(ec) do
|
||||
if (ec ~= 0) then
|
||||
print("Command ".. tostring(i) .." git " .. table.concat(argv[i], " ") .. "\" failed with exit code " .. tostring(ec) .. " and output;")
|
||||
print(stderr[i])
|
||||
print()
|
||||
print(stdout[i])
|
||||
print()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function build_glfw3(...)
|
||||
fs.create_dir("thirdparty/glfw/bin")
|
||||
local err, stdout, stderr = platform.exec("cmake", {
|
||||
"-S", "thirdparty/glfw",
|
||||
"-B", "thirdparty/glfw/bin",
|
||||
"-D BUILD_SHARED_LIBS=ON",
|
||||
"-D GLFW_LIBRARY_TYPE=STATIC",
|
||||
"-D GLFW_BUILD_TESTS=OFF",
|
||||
"-D GLFW_BUILD_DOCS=OFF",
|
||||
--"-D USE_MSVC_RUNTIME_LIBRARY_DLL=ON",
|
||||
...
|
||||
})
|
||||
platform.exec("cmake", {"--build thirdparty/glfw/bin"})
|
||||
if err ~= 0 then print(stdout); print(); print(stderr); print(); end
|
||||
end
|
||||
|
||||
download_requirements()
|
||||
build_glfw3(...)
|
||||
Reference in New Issue
Block a user