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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With