【问题标题】:debian packaging - cmake projectdebian 打包 - cmake 项目
【发布时间】:2013-06-05 22:00:46
【问题描述】:

我正在从一个组织在 2 个源目录中的 cmake 项目构建一个包:

手动构建时,我必须进入 2 个 src 目录并执行以下操作:

cd src1
mkdir build
cd build
cmake ..
etc.

cd src2
mkdir build
cd build
cmake ..
etc.

现在翻译成我拥有的 debian/rules 文件:

#!/usr/bin/make -f
export DH_OPTIONS
export DH_VERBOSE=1

%:
   dh "$@" -Dsrc1 --buildsystem=cmake
   dh "$@" -Dsrc2 --buildsystem=cmake

这不起作用,只能使用 src1 构建包。有什么提示吗?

【问题讨论】:

    标签: ubuntu cmake package debian


    【解决方案1】:

    dh 命令自动检测buildsystem。我建议你查看dh 的手册页。

    man dh
    

    您可以在debian/rules 文件中尝试此代码:

    #!/usr/bin/make -f
    %:
        dh  $@ --sourcedirectory=src1
        dh  $@ --sourcedirectory=src2
    

    使用制表符缩进 dh 行,而不是空格,因为 makefile 语法。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-04-22
      • 2020-11-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多