← All tasks
cppBehaviorTree/BehaviorTree.CPP #1120Not a task: not reproduced

Allow overriding installation directories to support multiarch packaging (Debian/Ubuntu) and standalone usage

envgap__BehaviorTree__BehaviorTree.CPP-1120

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
8068d683814870a222c3c491b6a81cebf737116c
Manifest
CMakeLists.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

BehaviorTree/BehaviorTree.CPP #1120 · read the original issue
Hi there, thanks for this amazing library!

I am currently working on packaging `BehaviorTree.CPP` natively for Debian/Ubuntu systems using standard Debian packaging tools (`dpkg-buildpackage`). 

I understand that the installation paths in `CMakeLists.txt` might be hardcoded to ensure it builds seamlessly and consistently within the ROS/ROS2 ecosystem (e.g., ament/catkin). However, for users and system maintainers who want to use or package `BehaviorTree.CPP` as a standalone, general-purpose C++ library, this strict hardcoding causes some limitations.

### Description

In Debian-based systems, libraries should be installed into multiarch directories like `/usr/lib/x86_64-linux-gnu` instead of `/usr/lib/`. 
When configuring with CMake, I pass the argument `-DBTCPP_LIB_DESTINATION=lib/x86_64-linux-gnu`, but it gets overwritten during the build process because the paths are defined using normal `set()` commands without the `CACHE` option.

In `CMakeLists.txt`:
```cmake
set(BTCPP_LIB_DESTINATION     lib)
set(BTCPP_INCLUDE_DESTINATION include)
set(BTCPP_BIN_DESTINATION     bin)
```
### Expected behavior

It would be incredibly helpful if these destination paths could be overridden via CMake command-line arguments (e.g., -DBTCPP_LIB_DESTINATION=...) for non-ROS environments.

### Suggested Solution

The most standard CMake approach would be to use the GNUInstallDirs module, which automatically handles platform-specific installation paths.

Alternatively, simply making them CACHE variables would solve the issue without breaking any existing ROS workflows:
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]