summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2018-09-04 22:36:07 +0800
committerruki <[email protected]>2018-09-04 09:36:46 +0800
commit08e1b8a09835cba95ba25f40a5a9b4a2a2a55263 (patch)
tree2d9753958389932472d3c00fbc58c010b18c483c
parent35876060fbf8f1141097b7841c90a5512e85e8a1 (diff)
fix rpath for shared library
-rw-r--r--CHANGELOG.md4
-rw-r--r--xmake/core/tool/builder.lua2
-rw-r--r--xmake/languages/c++/xmake.lua3
3 files changed, 8 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 36fba53ec..8f1d95c56 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,7 @@
* Support case-insensitive path pattern-matching for `add_files()` on windows
* Improve to detect Qt sdk directory for `detect.sdks.find_qt`
* [#184](https://github.com/tboox/xmake/issues/184): Improve `lib.detect.find_package` to support vcpkg
+* [#208](https://github.com/tboox/xmake/issues/208): Improve rpath for shared library
### Bug fixed
@@ -24,6 +25,7 @@
* Fix high cpu usage bug and Exit issues for `$ xmake f --menu`
* [#197](https://github.com/tboox/xmake/issues/197): Fix Chinese path for generating vs201x project
* Fix wdk rules bug
+* [#205](https://github.com/tboox/xmake/pull/205): Fix targetdir,objectdir not used in vsproject
## v2.2.1
@@ -495,6 +497,7 @@
* 对于`add_files()`在windows上支持大小写不敏感路径模式匹配
* 改进`detect.sdks.find_qt`对于Qt根目录的探测
* [#184](https://github.com/tboox/xmake/issues/184): 改进`lib.detect.find_package`支持vcpkg
+* [#208](https://github.com/tboox/xmake/issues/208): 改进rpath对动态库的支持
### Bugs修复
@@ -502,6 +505,7 @@
* 修复`$ xmake f --menu`中Exit问题以及cpu过高问题
* [#197](https://github.com/tboox/xmake/issues/197): 修复生成的vs201x工程文件带有中文路径乱码问题
* 修复WDK规则编译生成的驱动在Win7下运行蓝屏问题
+* [#205](https://github.com/tboox/xmake/pull/205): 修复vcproj工程生成targetdir, objectdir路径设置不匹配问题
## v2.2.1
diff --git a/xmake/core/tool/builder.lua b/xmake/core/tool/builder.lua
index 3aa123188..ac2f5a3b3 100644
--- a/xmake/core/tool/builder.lua
+++ b/xmake/core/tool/builder.lua
@@ -157,7 +157,7 @@ function builder:_inherit_from_targetdeps(results, target, flagname)
-- inherit linkdirs from the depdent target
self:_inherit_from_target(results, dep, "linkdirs")
- elseif flagname == "rpathdirs" and targetkind == "binary" then
+ elseif flagname == "rpathdirs" and (targetkind == "binary" or targetkind == "shared") then
-- make rpathdir
local rpathdir = "@loader_path"
diff --git a/xmake/languages/c++/xmake.lua b/xmake/languages/c++/xmake.lua
index 34ed07fc8..7326cd562 100644
--- a/xmake/languages/c++/xmake.lua
+++ b/xmake/languages/c++/xmake.lua
@@ -119,13 +119,16 @@ language("c++")
, "config.frameworkdirs"
, "target.linkdirs"
, "target.frameworkdirs"
+ , "target.rpathdirs"
, "target.strip"
, "target.symbols"
, "option.strip"
, "option.symbols"
, "option.linkdirs"
+ , "option.rpathdirs"
, "option.frameworkdirs"
, "platform.linkdirs"
+ , "platform.rpathdirs"
, "platform.frameworkdirs"
, "config.links"
, "config.frameworks"