Write pchheader to Makefile as reletive path

This commit is contained in:
stream 2015-12-27 03:26:29 +09:00
parent e440d1d8a5
commit 3b7e983eca

View File

@ -467,13 +467,18 @@
-- add a conditional configuration to the project script.
local pch = cfg.pchheader
local found = false
for _, incdir in ipairs(cfg.includedirs) do
local testname = path.join(incdir, pch)
if os.isfile(testname) then
pch = project.getrelative(cfg.project, testname)
found = true
break
end
end
if not found then
pch = project.getrelative(cfg.project, path.getabsolute(pch))
end
_x(' PCH = %s', pch)
_p(' GCH = $(OBJDIR)/$(notdir $(PCH)).gch')