Skip to content
New issue

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

使用xmake/xrepo安装workflow/libwfkafka #742

Open
bradfordzhang opened this issue Jan 24, 2022 · 1 comment
Open

使用xmake/xrepo安装workflow/libwfkafka #742

bradfordzhang opened this issue Jan 24, 2022 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@bradfordzhang
Copy link

bradfordzhang commented Jan 24, 2022

0. 关于 xmake

xmake 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。

虽然,简单易用是 xmake 的一大特色,但 xmake 的功能也是非常强大的,既能够像 Make/Ninja 那样可以直接编译项目,也可以像 CMake/Meson 那样生成工程文件,还有内置的包管理系统来帮助用户解决 C/C++依赖库的集成使用问题。

目前,xmake主要用于C/C++项目的构建,但是同时也支持其他native语言的构建,可以实现跟C/C++进行混合编译,同时编译速度也是非常的快,可以跟Ninja持平。

1.安装xmake及xrepo

xmake-docs

2.安装workflow/libwfkafka

i.在您的项目中使用workflow/libwfkafka

xmake.lua中添加add_requires("workflow")add_requires("libwfkafka")并在target下添加add_packages("workflow")add_packages("libwfkafka")

example:

add_requires("workflow")
target("test")
    set_kind("binary")
    add_files("src/*.cpp")
    add_packages("workflow")

ii. 安装包

基本使用

安装workflow

$ xrepo install workflow

安装wfkafka

$ xrepo install libwfkafka

安装指定版本包

完整支持 Semantic Versioning (语义版本)。

$ xrepo install "workflow 0.9.x"
$ xrepo install "libwfkafka >=0.9.10"

安装指定平台包

$ xrepo install -p android [--ndk=/xxx] workflow
$ xrepo install -p linux [--mingw=/xxx] libwfkafka
$ xrepo install -p macosx [--mingw=/xxx] workflow

安装动态库版本包

$ xrepo install -k shared workflow

Done!

@Barenboim Barenboim added the documentation Improvements or additions to documentation label Jan 24, 2022
@senluowx
Copy link

senluowx commented Jun 30, 2023

可以支持交叉编译吗

xrepo install -p cross --sdk="aarch64-linux-musl-cross" workflow

提示

note: the following packages are unsupported on cross/arm64:
  -> workflow v0.10.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants