Skip to content

增加对make、cmake、xmake等工具的支持 #177

Description

@tz12323

例如添加mcpplibs上没有的库,以添加cjson为例

[package]
name = "add"
version = "0.1.0"

[targets.hello]
kind = "bin"
main = "src/main.cpp"

[targets.Math]
kind = "lib"

[dependencies]
cjson = { git = "https://github.com/DaveGamble/cJSON.git", tag = "v1.7.19" }


[dev-dependencies]
gtest = "1.15.2"

运行命令
mcpp build
输出

   Resolving toolchain
    Resolved llvm@20.1.7 → @mcpp/registry/data/xpkgs/xim-x-llvm/20.1.7/bin/clang++.exe
     Cloning https://github.com/DaveGamble/cJSON.git (tag = v1.7.19)
Cloning into 'D:\bianchen\c\hello\.mcpp\git\814463864742f017'...
remote: Enumerating objects: 4723, done.
remote: Counting objects: 100% (1515/1515), done.
remote: Compressing objects: 100% (177/177), done.
remote: Total 4723 (delta 1408), reused 1338 (delta 1338), pack-reused 3208 (from 1)
Receiving objects: 100% (4723/4723), 2.49 MiB | 3.98 MiB/s, done.
Resolving deltas: 100% (3154/3154), done.
error: git dependency 'cjson' (at 'D:\bianchen\c\hello\.mcpp\git\814463864742f017') has no mcpp.toml

在此提出一些意见,对于没有使用mcpp构建而使用其余常用的软件,诸如cmake、make、xmake等时,可以先调用对应的软件编译,并且安装,然后扫描安装目录,编译时直接链接。

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions