XyKong

Results 10 comments of XyKong

> Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you...

Is any progress?? I want `fmtlib` more flexible like std::ostream. For example, ```cpp void print_something_anywhere(std::ostream &output) { output

> 你 add_packages 只加在 dylib target 里,那么 fmt 的 link 和 linkdirs 只对这个 target 生效,main target 是不可见的,你要让 main link 时候,也能 link 到 fmt ,得设置为 public 对 main target 导出 linkdirs/links,或者干脆...

@waruqi 这是一个CMake实现的示例与结果: > [https://github.com/traversebitree/test_cmake_shared_link_chain_with_vcpkg](https://github.com/traversebitree/test_cmake_shared_link_chain_with_vcpkg) > [https://github.com/traversebitree/test_cmake_shared_link_chain_with_vcpkg/actions/runs/7799832121](https://github.com/traversebitree/test_cmake_shared_link_chain_with_vcpkg/actions/runs/7799832121) 用vcpkg作为包管理器,可执行程序"main"只依赖"mydylib"; "mydylib"只依赖"fmt"。`target_link_libraries`全程都是`PRIVATE`的,在"main.cpp"是里无法`#include `的

@waruqi 我测试了下,能解决问题了,但是需要加上判断,判断平台是linux。这个flag应该是macos出问题。 [https://github.com/traversebitree/test_xmake_shared_link_chain_with_add_package/actions/runs/7815925997/job/21320344680](https://github.com/traversebitree/test_xmake_shared_link_chain_with_add_package/actions/runs/7815925997/job/21320344680) 加上判断就不报错了 ```lua target("mydylib") do set_kind("shared") add_files("dylibsrc/dylibsrc.cpp") add_includedirs("dylibsrc/", { public = true }) add_headerfiles("dylibsrc/dylibsrc.hpp", { install = true }) add_packages("fmt", { public = false }) on_load(function(target) if target:is_plat("linux")...

@waruqi 但这会不会造成 `-rpath-link` 污染?

> @waruqi 但这会不会造成 `-rpath-link` 污染? 实测了一下,不会污染 😄 ![image](https://github.com/xmake-io/xmake/assets/30373236/490f7cae-bbf0-4454-bf81-358d9c5d5210)

Any Progress? If Conan's `CMakeDeps` can automatically resolve dependencies, that would be even better. Vcpkg provides two options for users to easily copy runtimes to the **build directory** and **installation...

@i-ky Thank you! And will you consider putting this feature in `.clang-tidy`?? I think this feature is static code analysis.