Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

debian packaging - cmake project

I am building a package from a cmake project organized in 2 source directories:

When building manually I have to go in the 2 src dirs and do:

cd src1
mkdir build
cd build
cmake ..
etc.

cd src2
mkdir build
cd build
cmake ..
etc.

Now translated into a debian/rules files I have:

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

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

This does not work and only builds package with src1. Any hint?

like image 329
titanium Avatar asked Jun 10 '13 09:06

titanium


1 Answers

The dh command automatically detects the buildsystem. I recommend you to check the man pages of dh.

man dh

You can try this code in your debian/rules file:

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

Indent the dh lines with tabs, not with spaces because of makefile syntax.

like image 87
Chanilino Avatar answered Oct 22 '22 16:10

Chanilino