Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set CMAKE_INSTALL_LIBDIR=lib in debian/control for ROS1 packages #689

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions bloom/generators/debian/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@

from bloom.packages import get_package_data

from bloom.rosdistro_api import get_distribution_type

from bloom.util import code
from bloom.util import to_unicode
from bloom.util import execute_command
Expand Down Expand Up @@ -344,6 +346,9 @@ def generate_substitutions_from_package(
data['Package'] = sanitize_package_name(package.name)
# Installation prefix
data['InstallationPrefix'] = installation_prefix
# ROS version
ros_distro_type = get_distribution_type(ros_distro)
data['RosVersion'] = int(ros_distro_type[3:])
# Resolve dependencies
evaluate_package_conditions(package, ros_distro)
depends = [
Expand Down
3 changes: 3 additions & 0 deletions bloom/generators/debian/templates/catkin/rules.em
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ override_dh_auto_configure:
# In case we're installing to a non-standard location, look for a setup.sh
# in the install tree that was dropped by catkin, and source it. It will
# set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
# Note that CMAKE_INSTALL_LIBDIR is set to lib/<multiarch> by default, but
# only affects packages that use GNUInstallDirs.
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \
dh_auto_configure -- \
-DCATKIN_BUILD_BINARY_PACKAGE="1" \
-DCMAKE_INSTALL_LIBDIR="lib" \
-DCMAKE_INSTALL_PREFIX="@(InstallationPrefix)" \
-DCMAKE_PREFIX_PATH="@(InstallationPrefix)" \
$(BUILD_TESTING_ARG)
Expand Down
6 changes: 4 additions & 2 deletions bloom/generators/debian/templates/cmake/rules.em
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
override_dh_auto_configure:
# In case we're installing to a non-standard location, look for a setup.sh
# in the install tree and source it. It will set things like
# CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
# CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.@[if RosVersion == 1]
# CMAKE_INSTALL_LIBDIR is set for packages that use GNUInstallDirs.@[end if]
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \
dh_auto_configure -- \
-DCMAKE_INSTALL_PREFIX="@(InstallationPrefix)" \
-DCMAKE_INSTALL_PREFIX="@(InstallationPrefix)" \@[if RosVersion == 1]
-DCMAKE_INSTALL_LIBDIR="lib" \@[end if]
-DCMAKE_PREFIX_PATH="@(InstallationPrefix)" \
$(BUILD_TESTING_ARG)

Expand Down