Merge pull request #388 from stream009/fix-pch

Fix: Write pchheader to Makefile as reletive path
This commit is contained in:
Jason Perkins 2015-12-27 15:06:16 -05:00
commit 9f0d2d721a

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')