Skip to content

优化在cmake中链接xrepo安装的库的方式 #40

Open
@aiyolo

Description

Is your feature request related to a problem? Please describe.

从文档看,如果在cmake项目中继承xrepo功能,需要使用

xrepo_package("gflags 2.2.2" CONFIGS "shared=true,mt=true")
xrepo_target_packages(example-bin gflags)

这种方式比较繁琐,且需要对之前项目使用的cmake文件有较大的改动

Describe the solution you'd like

如果能修改成类似于vcpkg的处理方式会更加易用,即
1、用户给出xrepo.json的依赖文件
2、cmake中使用xmake_toolchain,找到所有的依赖
3、用户调用find_package, target_link_library 链接依赖库

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions