summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2019-01-17 00:51:59 +0800
committerruki <[email protected]>2019-01-16 23:11:56 +0800
commit7d011ff2746b005f1346c66ab19aae1b9ba77d3f (patch)
tree0f906e5016ade13c54c9c9463237d24c0b5897ba
parent8aca38678b43b9fbf96964ae6fd104ea9e5000a3 (diff)
add add_headerdirs api
-rw-r--r--CHANGELOG.md2
-rw-r--r--xmake/core/tool/builder.lua8
2 files changed, 9 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index eb0f7bcf1..1cc0e2641 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -20,6 +20,7 @@
* [#322](https://github.com/tboox/xmake/issues/322): Add `option.add_features`, `option.add_cxxsnippets` and `option.add_csnippets`
* Remove some deprecated interfaces of xmake 1.x, e.g. `add_option_xxx`
* [#327](https://github.com/tboox/xmake/issues/327): Support conan package manager for `lib.detect.find_package`
+* [#319](https://github.com/tboox/xmake/issues/319): Add `add_headerfiles` and `add_headerdirs` to improve to set header files and directories
### Bugs fixed
@@ -562,6 +563,7 @@
* [#322](https://github.com/tboox/xmake/issues/322): 添加`option.add_features`, `option.add_cxxsnippets` 和 `option.add_csnippets`
* 移除xmake 1.x的一些废弃接口, 例如:`add_option_xxx`
* [#327](https://github.com/tboox/xmake/issues/327): 改进`lib.detect.find_package`增加对conan包管理器的支持
+* [#319](https://github.com/tboox/xmake/issues/319): 添加`add_headerfiles`和`add_headerdirs`接口去改进头文件的设置
### Bugs修复
diff --git a/xmake/core/tool/builder.lua b/xmake/core/tool/builder.lua
index 69335a9e5..09daa029f 100644
--- a/xmake/core/tool/builder.lua
+++ b/xmake/core/tool/builder.lua
@@ -191,10 +191,16 @@ function builder:_inherit_from_targetdeps(results, target, flagname)
elseif flagname == "includedirs" then
- -- add dependent headerdir
+ -- TODO add dependent headerdir (deprecated)
if dep:get("headers") and os.isdir(dep:headerdir()) then
table.insert(results, dep:headerdir())
end
+
+ -- add dependent header directories
+ local headerdirs = dep:get("headerdirs")
+ if headerdirs then
+ table.join2(results, headerdirs)
+ end
-- add dependent configheader directory
local configheader = dep:configheader()