summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-02-07 22:52:21 +0800
committerruki <[email protected]>2022-02-07 22:52:21 +0800
commite224edb4709a9c67925edfaf909beb5dea6ee22d (patch)
treea8925b5a01edcaf206bdd170dc5103571a8b68ac
parent35e9deaaa950521472ba54bf2fffb5f20e32011d (diff)
fix rootdir
-rw-r--r--xmake/core/project/target.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua
index d5de85ddc..3bf40be81 100644
--- a/xmake/core/project/target.lua
+++ b/xmake/core/project/target.lua
@@ -1473,6 +1473,9 @@ function _instance:headerfiles(outputdir, only_deprecated)
if count == 0 then
rootdir = nil
end
+ if rootdir and rootdir:trim() == "" then
+ rootdir = nil
+ end
-- remove '(' and ')' first
local srcpaths = header:gsub("[%(%)]", "")
@@ -1850,6 +1853,9 @@ function _instance:configheader(outputdir)
if count == 0 then
rootdir = nil
end
+ if rootdir and rootdir:trim() == "" then
+ rootdir = nil
+ end
-- remove '(' and ')'
configheader = configheader:gsub("[%(%)]", "")