diff options
| author | Opportunity <[email protected]> | 2020-06-30 12:08:46 +0800 |
|---|---|---|
| committer | Opportunity <[email protected]> | 2020-06-30 12:08:46 +0800 |
| commit | 6dd3577da0219a388ea2b3331cb9956c1e915dcd (patch) | |
| tree | 5ea901dd29d0610f0fafe0f2c3bf6b85ff64dd4d /xmake/core/project/target.lua | |
| parent | 58c8e709cc4677ec6fb5fdfcec1958fab6743709 (diff) | |
set defaults for buildir
Diffstat (limited to 'xmake/core/project/target.lua')
| -rw-r--r-- | xmake/core/project/target.lua | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index d7f44c4af..fc73acd25 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -875,17 +875,8 @@ end -- get the target directory function _instance:targetdir() - -- the target directory - local targetdir = self:get("targetdir") - if not targetdir then - - -- get build directory - targetdir = config.buildir() - end - - if not targetdir then - return nil - end + -- the target directory or build directory + local targetdir = self:get("targetdir") or config.buildir() -- append plat sub-directory local plat = self:plat() @@ -909,7 +900,7 @@ function _instance:targetdir() return targetdir end --- get the target file +-- get the target file function _instance:targetfile() -- the target directory @@ -920,7 +911,7 @@ function _instance:targetfile() -- only compile objects? no target file if targetkind == "object" then - return + return end -- make the target file name and attempt to use the format of linker first @@ -935,7 +926,7 @@ end function _instance:symbolfile() -- the target directory - local targetdir = self:targetdir() or config.buildir() + local targetdir = self:targetdir() assert(targetdir and type(targetdir) == "string") -- the symbol file name |
