We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
需要为header-only的target导出pkgconfig和cmake的import files
目前会报错error: install failed, pkgconfig_importfiles: only support for library target(testheader)!
在header-only target的import files中忽略library,只提供include。eigen库可以作为参考(这是一个header-only library)
The text was updated successfully, but these errors were encountered:
我加了个 headeronly 的 target kind ,专门处理这些,install 那个也从 phony 改成 headeronly 好了。
add_rules("mode.release", "mode.debug") target("foo") set_kind("headeronly") add_headerfiles("src/foo.h") add_rules("utils.install.cmake_importfiles") add_rules("utils.install.pkgconfig_importfiles")
cmake import files 我部署,我加了个空的,可以帮忙提个 pr 改下增加对 headerfiles 的支持,https://github.com/xmake-io/xmake/blob/dev/xmake/scripts/cmake_importfiles/xxxTargets-headeronly.cmake
headeronly 下,会装这个而不是 xxxTargets-debug/release.cmake
Sorry, something went wrong.
你先试试,按理 xxxTargets-headeronly.cmake 空的应该也没事,不行到时候再改进下。
headeronly的library类型应该设为interface而不是static/shared;确实不需要Targets-headeronly.cmake文件,可以直接不要
pkgconfig的.pc文件没有正确生成
No branches or pull requests
你在什么场景下需要该功能?
需要为header-only的target导出pkgconfig和cmake的import files
目前会报错error: install failed, pkgconfig_importfiles: only support for library target(testheader)!
描述可能的解决方案
在header-only target的import files中忽略library,只提供include。eigen库可以作为参考(这是一个header-only library)
The text was updated successfully, but these errors were encountered: