Plugins .so installed into CMAKE_INSTALL_PREFIX/bin on Linux
Sounds like this behavior hardcoded in the root CMakeLists.txt: https://github.com/facontidavide/PlotJuggler/blob/a614a5476785b08d7a1d4a56c1d625dd7357c0d5/CMakeLists.txt#L267
I package it into pacman format (build from AUR) and after install it looks strange:
plotjuggler /usr/bin/libDataLoadCSV.so
plotjuggler /usr/bin/libDataLoadMCAP.so
plotjuggler /usr/bin/libDataLoadParquet.so
plotjuggler /usr/bin/libDataLoadULog.so
plotjuggler /usr/bin/libDataStreamSample.so
plotjuggler /usr/bin/libDataStreamUDP.so
plotjuggler /usr/bin/libDataStreamWebSocket.so
plotjuggler /usr/bin/libDataStreamZMQ.so
plotjuggler /usr/bin/libParserDataTamer.so
plotjuggler /usr/bin/libParserLineInflux.so
plotjuggler /usr/bin/libParserROS1.so
plotjuggler /usr/bin/libParserROS2.so
plotjuggler /usr/bin/libProtobufParser.so
plotjuggler /usr/bin/libPublisherCSV.so
plotjuggler /usr/bin/libToolboxFFT.so
plotjuggler /usr/bin/libToolboxLuaEditor.so
plotjuggler /usr/bin/libToolboxQuaternion.so
that is correct. if you have any proposal, let me know
Hmm. Shared object mostly targeted to the lib. Maybe lib/PlotJuggler/. Or just provide way to override it via cmake arguments for packagers
This issue was discovered while refactoring the Arch Linux package. I posted a quick analysis here: https://aur.archlinux.org/packages/plotjuggler#comment-1037888
Plugins (
lib….so) are installed to/usr/bin, but should better be installed to/usr/lib/plogjuggler/plugins. This requires overridingPJ_PLUGIN_INSTALL_DIRECTORY(patch forCMakeLists.txt) and adding it tovoid MainWindow::loadAllPlugins(QStringList)inplotjuggler_app/mainwindow.cpp(maybe something for upstream?).I think we could simply patch the path in
plotjuggler_app/mainwindow.cppand overridePJ_PLUGIN_INSTALL_DIRECTORYin theCMakeLists.txt(might also require a patch because the value is determined automatically at the moment).
My suggestion is to make it possible to override PJ_PLUGIN_INSTALL_DIRECTORY in cmake and add PJ_PLUGIN_INSTALL_DIRECTORY to the search path in void MainWindow::loadAllPlugins(QStringList). Then the maintainer has the possibility to move the plugins to any location they want.
you are welcome to submit a PR.
I am already juggling between multiple build systems, and multiple operative system.
Playing nice with Arch is not on my immediate todo list
Thanks, I'll try to take a look at it when time permits.