Skip to content

Commit

Permalink
glyn fixed the quantaum dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Ragingram2 committed May 3, 2024
1 parent 6edd409 commit bb8e234
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 9 deletions.
7 changes: 7 additions & 0 deletions applications/core_test/.rythe_project
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
local project = {
dependencies = {
"rythe/core"
}
}

return project
14 changes: 14 additions & 0 deletions applications/core_test/src/core_test/source.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#define RYTHE_ENTRY

#include <rsl/time>
#include <rsl/math>
#include <rsl/logging>
#include <chrono>
#include <iostream>

#include <core/core.hpp>

void RYTHE_CCONV reportModules()
{
rsl::log::debug("Hello World");
}
Binary file removed applications/unit_tests/engine/tools/lgnspre.exe
Binary file not shown.
27 changes: 18 additions & 9 deletions premake/rythe/projects.lua
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ local function printTable(name, table, indent)
indent = indent:sub(-1)
end

local function loadProject(projectId, project, projectPath, name, projectType)
local function loadProject(projectId, project, projectPath, name, projectType)
if project.alias == nil then
project.alias = name
end
Expand Down Expand Up @@ -227,11 +227,9 @@ function projects.load(projectPath)

local projectFile, thirdPartyFile, group, name, projectType = find(projectPath)
local projectId = getProjectId(group, name)

local project = loadedProjects[projectId]

if project ~= nil then
return project

if loadedProjects[projectId] ~= nil then
return loadedProjects[projectId]
end

if projectFile == nil then
Expand Down Expand Up @@ -275,7 +273,7 @@ function projects.load(projectPath)
end
end

project = dofile(projectFile)
local project = dofile(projectFile)

project.group = group
project.name = name
Expand Down Expand Up @@ -343,7 +341,7 @@ local function getDepsRecursive(project, projectType)
deps[#deps + 1] = "third_party/catch2"
end

local copy = deps
local copy = utils.copyTable(deps)

local set = {}

Expand Down Expand Up @@ -431,6 +429,12 @@ local function getDepsRecursive(project, projectType)
return copy
end

function projects.resolveDeps(proj)
for i, projectType in ipairs(proj.types) do
getDepsRecursive(proj, projectType)
end
end

function projects.submit(proj)
local configSetup = {
[rythe.Configuration.RELEASE] = setupRelease,
Expand Down Expand Up @@ -590,7 +594,12 @@ function projects.scan(path)
for i, dir in ipairs(srcDirs) do
local project = projects.load(dir)
end


local sourceProjects = utils.copyTable(loadedProjects)
for projectId, project in pairs(sourceProjects) do
projects.resolveDeps(project)
end

for projectId, project in pairs(loadedProjects) do
projects.submit(project)
end
Expand Down
8 changes: 8 additions & 0 deletions premake/rythe/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,12 @@ function utils.stringEndsWith(str, suffix)
return str:sub(-#suffix) == suffix
end

function utils.copyTable(t)
local copy = {}
for key, value in pairs(t) do
copy[key] = value
end
return copy
end

return utils

0 comments on commit bb8e234

Please sign in to comment.