Skip to content

Commit

Permalink
fix includes for third party libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
GlynLeine committed Dec 14, 2023
1 parent 101b8a4 commit ce9399f
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions premake/rythe/projects.lua
Original file line number Diff line number Diff line change
Expand Up @@ -327,38 +327,32 @@ local function getDepsRecursive(project, projectType)

if fs.exists(path .. "/") then
thirdPartyProject.files = {}
thirdPartyProject.additional_include_dirs = {}
thirdPartyProject.additional_external_include_dirs = {}

thirdPartyProject.additional_include_dirs = {
path .. "/src",
path .. "/include"
}

thirdPartyProject.additional_external_include_dirs = {
path .. "/src",
path .. "/include"
}

local srcDir = path .. "/src/" .. thirdPartyProject.name .. "/"
if fs.exists(srcDir) then
thirdPartyProject.files[#thirdPartyProject.files + 1] = srcDir .. "**"
thirdPartyProject.additional_include_dirs[#thirdPartyProject.additional_include_dirs + 1] = srcDir
thirdPartyProject.additional_external_include_dirs[#thirdPartyProject.additional_external_include_dirs + 1] = srcDir
end

local includeDir = path .. "/include/" .. thirdPartyProject.name .. "/"
if fs.exists(includeDir) then
thirdPartyProject.files[#thirdPartyProject.files + 1] = includeDir .. "**"
thirdPartyProject.additional_include_dirs[#thirdPartyProject.additional_include_dirs + 1] = includeDir
thirdPartyProject.additional_external_include_dirs[#thirdPartyProject.additional_external_include_dirs + 1] = includeDir
end

if utils.tableIsEmpty(thirdPartyProject.files) then
thirdPartyProject.files = {
path .. "/src/**",
path .. "/include/**"
}

thirdPartyProject.additional_include_dirs = {
path .. "/src",
path .. "/include"
}

thirdPartyProject.additional_external_include_dirs = {
path .. "/src",
path .. "/include"
}
end

depProject = loadProject(depId, thirdPartyProject, project.src, path, thirdPartyProject.name, "library")
Expand Down

0 comments on commit ce9399f

Please sign in to comment.