summaryrefslogtreecommitdiff
path: root/xmake/rules/c++/modules/modules_support/msvc.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2022-08-05 00:45:59 +0800
committerruki <[email protected]>2022-08-05 00:45:59 +0800
commit88c91ec3ff285ba148a04a01e8e32bdf2b186dc5 (patch)
treed0faca1f84258772053d25b85f8fe228228bdb0a /xmake/rules/c++/modules/modules_support/msvc.lua
parentfc011e7ae96d00c209550022ce44f66ec002a474 (diff)
use projectdir var
Diffstat (limited to 'xmake/rules/c++/modules/modules_support/msvc.lua')
-rw-r--r--xmake/rules/c++/modules/modules_support/msvc.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/rules/c++/modules/modules_support/msvc.lua b/xmake/rules/c++/modules/modules_support/msvc.lua
index 37bcf0b89..02c48524f 100644
--- a/xmake/rules/c++/modules/modules_support/msvc.lua
+++ b/xmake/rules/c++/modules/modules_support/msvc.lua
@@ -131,13 +131,14 @@ function generate_headerunits(target, batchcmds, headerunits, opt)
local objectfiles = {}
local public_flags = {}
local private_flags = {}
+ local projectdir = os.projectdir()
for _, headerunit in ipairs(headerunits) do
if not headerunit.stl then
local file = path.relative(headerunit.path, target:scriptdir())
local objectfile = target:objectfile(file)
local outputdir
if headerunit.type == ":quote" then
- outputdir = path.join(cachedir, path.directory(path.relative(headerunit.path, project.directory())))
+ outputdir = path.join(cachedir, path.directory(path.relative(headerunit.path, projectdir)))
else
outputdir = path.join(cachedir, path.directory(headerunit.path):sub(3))
end