Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 24, 2025

Plugins were being installed to /usr/OFF/*.so instead of /usr/lib/plotjuggler/plugins when building with CMAKE_INSTALL_PREFIX="/usr".

Root Cause

CMake's option() command is for boolean values. When used with a string like "lib/plotjuggler/plugins", it evaluates as boolean TRUE, which CMake converts to the string "OFF" in path contexts:

# Before (broken)
option(PJ_PLUGINS_DIRECTORY "Plugins directory" "lib/plotjuggler/plugins")
# Result: PJ_PLUGINS_DIRECTORY = "OFF" → /usr/OFF

# After (fixed)
set(PJ_PLUGINS_DIRECTORY "lib/plotjuggler/plugins" CACHE STRING "Plugins directory")
# Result: PJ_PLUGINS_DIRECTORY = "lib/plotjuggler/plugins" → /usr/lib/plotjuggler/plugins

Changes

  • Changed option() to set(... CACHE STRING ...) for PJ_PLUGINS_DIRECTORY and PJ_INSTALLATION
  • No impact on CATKIN/AMENT builds (they override this variable)
Original prompt

This section details on the original issue you should resolve

<issue_title>[BUG]: Plugins are now installed to /usr/OFF/*.so</issue_title>
<issue_description>After the latest CMakeLists refactoring in 3.14.5, plugins are now installed to /usr/OFF/*.so if no further CMake option is set. They should be installed into /usr/lib/plotjuggler/plugins (preferred) or the bin directory (as in previous versions, not recommended).

cmake -S . -B build -DCMAKE_INSTALL_PREFIX="/usr"
```</issue_description>

## Comments on the Issue (you are @copilot in this section)

<comments>
<comment_new><author>@facontidavide</author><body>
damn.. thanks for reporting</body></comment_new>
</comments>


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix plugin installation path in CMakeLists Fix plugin installation path from /usr/OFF to /usr/lib/plotjuggler/plugins Dec 24, 2025
Copilot AI requested a review from facontidavide December 24, 2025 10:59
@facontidavide facontidavide marked this pull request as ready for review December 24, 2025 11:32
@facontidavide facontidavide merged commit 28afcb9 into main Dec 24, 2025
16 checks passed
@facontidavide facontidavide deleted the copilot/fix-plugin-installation-path branch December 27, 2025 18:48
jlab13 pushed a commit to jlab13/PlotJuggler that referenced this pull request Dec 30, 2025
…ugins (facontidavide#1239)

* Initial plan

* Fix plugin installation path by changing option() to set() for PJ_PLUGINS_DIRECTORY

Co-authored-by: facontidavide <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: facontidavide <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: Plugins are now installed to /usr/OFF/*.so

2 participants