From 88c91ec3ff285ba148a04a01e8e32bdf2b186dc5 Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 5 Aug 2022 00:45:59 +0800 Subject: use projectdir var --- xmake/rules/c++/modules/modules_support/clang.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xmake/rules/c++/modules/modules_support/clang.lua') diff --git a/xmake/rules/c++/modules/modules_support/clang.lua b/xmake/rules/c++/modules/modules_support/clang.lua index c53716d51..00434ef81 100644 --- a/xmake/rules/c++/modules/modules_support/clang.lua +++ b/xmake/rules/c++/modules/modules_support/clang.lua @@ -143,6 +143,7 @@ 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()) @@ -150,7 +151,7 @@ function generate_headerunits(target, batchcmds, headerunits, opt) local outdir if headerunit.type == ":quote" then - outdir = path.join(cachedir, path.directory(path.relative(headerunit.path, project.directory()))) + outdir = path.join(cachedir, path.directory(path.relative(headerunit.path, projectdir))) else outdir = path.join(cachedir, path.directory(headerunit.path)) end -- cgit v1.3.1