-
Notifications
You must be signed in to change notification settings - Fork 810
Description
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:
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: