|
@@ -41,6 +41,18 @@ local function base_workspace_settings()
|
|
|
filter {}
|
|
filter {}
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
|
|
+local function selective_dependency_link(module_entries)
|
|
|
|
|
+ for _, mod in pairs(module_entries) do
|
|
|
|
|
+ if mod[1] ~= "None" then
|
|
|
|
|
+ links(mod.name)
|
|
|
|
|
+ end
|
|
|
|
|
+ end
|
|
|
|
|
+
|
|
|
|
|
+ for _, mod in pairs(module_entries) do
|
|
|
|
|
+ includedirs(mod[1].public_includes)
|
|
|
|
|
+ end
|
|
|
|
|
+end
|
|
|
|
|
+
|
|
|
local function link_against_modules(modules)
|
|
local function link_against_modules(modules)
|
|
|
for _, mod in pairs(modules) do
|
|
for _, mod in pairs(modules) do
|
|
|
links(mod.name)
|
|
links(mod.name)
|
|
@@ -48,6 +60,9 @@ local function link_against_modules(modules)
|
|
|
for _, mod in pairs(modules) do
|
|
for _, mod in pairs(modules) do
|
|
|
includedirs(mod.public_includes)
|
|
includedirs(mod.public_includes)
|
|
|
end
|
|
end
|
|
|
|
|
+ for _, mod in pairs(modules) do
|
|
|
|
|
+ selective_dependency_link(mod.module_dependencies)
|
|
|
|
|
+ end
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
--- An attempt at making a common ground for multiple libraries I'd use
|
|
--- An attempt at making a common ground for multiple libraries I'd use
|
|
@@ -139,8 +154,9 @@ local function library_module(lib_name, folder)
|
|
|
return self
|
|
return self
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
- function mod:require_module(module)
|
|
|
|
|
- self.module_dependencies:insert(module)
|
|
|
|
|
|
|
+ function mod:require_module(module, link_type)
|
|
|
|
|
+ table.insert(self.module_dependencies, {module, link_type})
|
|
|
|
|
+ return self
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
function mod:use_links(links)
|
|
function mod:use_links(links)
|
|
@@ -170,6 +186,8 @@ local function library_module(lib_name, folder)
|
|
|
includedirs(self.private_includes)
|
|
includedirs(self.private_includes)
|
|
|
links(self.links)
|
|
links(self.links)
|
|
|
|
|
|
|
|
|
|
+ selective_dependency_link(self.module_dependencies)
|
|
|
|
|
+
|
|
|
filter "system:windows"
|
|
filter "system:windows"
|
|
|
defines(self.win_defines)
|
|
defines(self.win_defines)
|
|
|
files(self.win_files)
|
|
files(self.win_files)
|