install: CLI 装到 <prefix>/bin - #22
Merged
Merged
Conversation
cli/ 是独立 Cargo 项目,此前不参与 cmake --install,`make install`
后系统里没有 kvspace 命令。现在:
- 新增自定义目标 kvspace-cli(ALL):cargo build cli/,并把本仓刚构建的
dispatch 前端目录交给链接器(RUSTFLAGS=-L native=...)
- install(PROGRAMS ... DESTINATION ${CMAKE_INSTALL_BINDIR})
→ prefix 默认 /usr,即 /usr/bin(与 kvlang 的 CLI 一致)
- 无 cargo 时跳过并提示(不阻断库的安装)
验证:cmake --build 自动构建 CLI;cmake --install 产出
<prefix>/bin/kvspace + 头 + lib/kvspace + pkgconfig。
Co-Authored-By: Claude Code <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
cli/(kvspace CLI)是独立 Cargo 项目,此前不参与cmake --install—— 构建安装后系统里没有kvspace命令,它只出现在 release 包里。变更
<prefix>/bin—— prefix 默认/usr,即/usr/bin,与 kvlang 的 CLI 一致验证
🤖 Generated with Claude Code