如何从源代码为CMake构建.deb文件? [英] How to build a .deb file for CMake from source?

查看:127
本文介绍了如何从源代码为CMake构建.deb文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

How do you produce a .deb file for ubuntu from the CMake source code?

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

I already installed (hopefully most of) the build dependencies using apt:

sudo apt-get build-dep cmake

使用git签出cmake仓库:

checked out the cmake repo using git:

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

使用我已经拥有的较旧的cmake来构建cmake:

built cmake using the older cmake I already have:

cd cmake cmake. make

下一步是什么?令人惊讶的是,这很难用Google搜索;大多数人想知道如何使用cmake包装自己的东西.CMake安装说明仅指定了 make install ,但是依我的经验,依赖包已经足够糟糕了.

what next? This is surprisingly hard to google for; most people want to know how to package their own stuff ~with cmake. The CMake install instructions just specify a make install but dependency hell is bad enough ~with a package manager in my experience.

推荐答案

构建cmake之后,使用

After building cmake, use cpack for generate deb package:

cpack -G DEB

它应该从构建树中运行.

It should be run from the build tree.

这篇关于如何从源代码为CMake构建.deb文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆