Packaging a CMake project (libRocket) into a .deb, but build script is in a sub folder

5,461

The debian/rules file is the script that runs the build process. You can tell it that the build script is in a sub folder by passing --sourcedirectory=Build So your's might look like:

#!/usr/bin/make -f

%:
    dh $@ --buildsystem=cmake --sourcedirectory=Build

See the manpage for the dh command Manpage icon for more information.

Share:
5,461

Related videos on Youtube

robvdl
Author by

robvdl

Updated on September 18, 2022

Comments

  • robvdl
    robvdl over 1 year

    I am trying to build a .deb package for libRocket (http://librocket.com/), but the build script is not in the source root but rather in a subfolder (/Build). See the Github source:

    https://github.com/lloydw/libRocket

    I can build it fine, using:

    cd Build
    cmake -DBUILD_PYTHON_BINDINGS=on
    

    I have tried debianising the project using dh_make but can't seem to figure out how to get it to look in the Build folder for a CMakeLists.txt file.

    • Admin
      Admin almost 9 years
      The options go after the $@: dh $@ --buildsystem=cmake --sourcedirectory=Build
  • robvdl
    robvdl almost 12 years
    Thanks, you got me going in the right direction, the manpage link is invalid, but "man dh" got me what I needed. Also, there is no need for the / before Build.
  • red.clover
    red.clover almost 12 years
    Great. Fixed above.
  • user.dz
    user.dz over 8 years
    @robvdl , Could accept this answer if it works for you. See askubuntu.com/help/someone-answers
  • Necktwi
    Necktwi over 7 years
    @andrewsomething can you answer askubuntu.com/questions/851419/… ?
  • Quanlong
    Quanlong almost 7 years
    Add usr/lib/*/cmak/* into dev.install file if your modules provides cmake files