summaryrefslogtreecommitdiff
path: root/xmake/core/project/target.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2017-05-12 11:03:34 +0800
committerruki <[email protected]>2017-05-12 11:03:34 +0800
commit2cfd41ae2fe1c008e9572538ebf90e5f898513f9 (patch)
treeab1186b3705253ce7f1130b12ce3008fa34a524a /xmake/core/project/target.lua
parent149d26d8fefd4d3dbba882131b926f4a852e336c (diff)
add includes and links from target deps automatically
Diffstat (limited to 'xmake/core/project/target.lua')
-rw-r--r--xmake/core/project/target.lua12
1 files changed, 11 insertions, 1 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua
index 76f2f7548..f58e2eb88 100644
--- a/xmake/core/project/target.lua
+++ b/xmake/core/project/target.lua
@@ -124,6 +124,11 @@ function target:linkflags()
return self:linker():linkflags(self)
end
+-- get target deps
+function target:deps()
+ return self._DEPS
+end
+
-- get the options
function target:options()
@@ -219,6 +224,11 @@ function target:scriptdir()
return self:get("__scriptdir")
end
+-- get header directory
+function target:headerdir()
+ return self:get("headerdir") or config.get("buildir")
+end
+
-- get the config header files
function target:configheader(outputdir)
@@ -401,7 +411,7 @@ function target:headerfiles(outputdir)
if not headers then return end
-- get the headerdir
- local headerdir = outputdir or self:get("headerdir") or config.get("buildir")
+ local headerdir = outputdir or self:headerdir()
assert(headerdir)
-- get the source pathes and destinate pathes