gpt4 book ai didi

ubuntu - 如何从源代码为 CMake 构建 .deb 文件?

转载 作者:行者123 更新时间:2023-12-04 00:18:24 31 4
gpt4 key购买 nike

如何从 CMake 源代码为 ubuntu 生成 .deb 文件?

我已经使用 apt 安装了(希望大部分)构建依赖项:

sudo apt-get build-dep cmake

使用 git 检查 cmake 仓库:

git clone http://www.cmake.org/cmake.git

使用我已有的旧 cmake 构建 cmake:

cd cmakecmake.制作

接下来呢?这出乎意料地难以用谷歌搜索;大多数人想知道如何使用 cmake 打包自己的东西。 CMake 安装说明仅指定一个 make install 但依赖 hell 已经够糟糕了 ~ 根据我的经验,使用包管理器。

最佳答案

构建 cmake 后,使用 cpack用于生成 deb 包:

cpack -G DEB

它应该从构建树中运行。

关于ubuntu - 如何从源代码为 CMake 构建 .deb 文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32012811/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com