forked from facontidavide/PlotJuggler
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
729e6a2
commit 0589417
Showing
10 changed files
with
233 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
# Compile in Linux | ||
|
||
On Ubuntu, the dependencies can be installed with the the command: | ||
|
||
sudo apt -y install qtbase5-dev libqt5svg5-dev libqt5websockets5-dev \ | ||
libqt5opengl5-dev libqt5x11extras5-dev libprotoc-dev libzmq-dev | ||
|
||
On Fedora: | ||
|
||
sudo dnf install qt5-qtbase-devel qt5-qtsvg-devel qt5-websockets-devel \ | ||
qt5-qtopendl-devel qt5-qtx11extras-devel | ||
|
||
Clone the repository into **~/plotjuggler_ws*: | ||
|
||
``` | ||
git clone https://github.com/facontidavide/PlotJuggler.git ~/plotjuggler_ws/src/PlotJuggler | ||
cd ~/plotjuggler_ws | ||
``` | ||
|
||
Then compile using cmake (qmake is NOT supported): | ||
|
||
``` | ||
cmake -S src/PlotJuggler -B build/PlotJuggler -DCMAKE_INSTALL_PREFIX=install | ||
cmake --build build/PlotJuggler --config RelWithDebInfo --parallel --target install | ||
``` | ||
|
||
## Optional: build with Conan | ||
|
||
If you want to use [conan](https://conan.io/) to manage the dependencies, | ||
follow this instructions instead. | ||
|
||
``` | ||
conan install src/PlotJuggler --install-folder build/PlotJuggler \ | ||
--build missing -pr:b=default | ||
export CMAKE_TOOLCHAIN=$(pwd)/build/PlotJuggler/conan_toolchain.cmake | ||
cmake -S src/PlotJuggler -B build/PlotJuggler \ | ||
-DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN \ | ||
-DCMAKE_INSTALL_PREFIX=install \ | ||
-DCMAKE_POLICY_DEFAULT_CMP0091=NEW | ||
cmake --build build/PlotJuggler --config RelWithDebInfo --parallel --target install | ||
``` | ||
|
||
## Deploy as an AppImage | ||
|
||
Compile and install as described earlier. | ||
|
||
Download (once) linuxdeploy: | ||
|
||
``` | ||
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage | ||
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage | ||
chmod +x linuxdeploy*.AppImage | ||
mkdir -p AppDir/usr/bin | ||
``` | ||
|
||
Then: | ||
|
||
``` | ||
cd src/PlotJuggler;export VERSION=$(git describe --abbrev=0 --tags);cd - | ||
echo $VERSION | ||
cp -v install/bin/* AppDir/usr/bin | ||
./linuxdeploy-x86_64.AppImage --appdir=AppDir \ | ||
-d ./PlotJuggler/PlotJuggler.desktop \ | ||
-i ./PlotJuggler/plotjuggler.png \ | ||
--plugin qt --output appimage | ||
``` | ||
|
||
# Compile in Windows | ||
|
||
Dependencies in Windows are managed either using | ||
[conan](https://conan.io/) or [vcpkg](https://vcpkg.io/en/index.html) | ||
|
||
The rest of this section assumes that you installed | ||
You need to install first [Qt](https://www.qt.io/download-open-source) and | ||
[git](https://desktop.github.com/). | ||
|
||
**Visual studio 2019 (16)**, that is part of the Qt 5.15.x installation, | ||
will be used to compile PlotJuggler. | ||
|
||
Start creating a folder called **plotjuggler_ws** and cloning the repo: | ||
|
||
``` | ||
cd \ | ||
mkdir plotjuggler_ws | ||
cd plotjuggler_ws | ||
git clone https://github.com/facontidavide/PlotJuggler.git src/PlotJuggler | ||
``` | ||
|
||
## Build with Conan | ||
|
||
Note: the Arrow/Parque plugin is not supported in Conan. Use vcpkg instead, if you need | ||
that specific plugin. | ||
|
||
``` | ||
conan install src/PlotJuggler --install-folder build/PlotJuggler ^ | ||
--build=missing -pr:b=default | ||
set CMAKE_TOOLCHAIN=%cd%/build/PlotJuggler/conan_toolchain.cmake | ||
cmake -G "Visual Studio 16" ^ | ||
-S src/PlotJuggler -B build/PlotJuggler ^ | ||
-DCMAKE_TOOLCHAIN_FILE=%CMAKE_TOOLCHAIN% ^ | ||
-DCMAKE_INSTALL_PREFIX=%cd%/install ^ | ||
-DCMAKE_POLICY_DEFAULT_CMP0091=NEW | ||
-D | ||
cmake --build build/PlotJuggler --config Release --parallel --target install | ||
``` | ||
|
||
## Build with vcpkg | ||
|
||
Change the path where **vcpkg.cmake** can be found as needed. | ||
|
||
``` | ||
set CMAKE_TOOLCHAIN=/path/vcpkg/scripts/buildsystems/vcpkg.cmake | ||
cmake -G "Visual Studio 16" ^ | ||
-S src/PlotJuggler -B build/PlotJuggler ^ | ||
-DCMAKE_TOOLCHAIN_FILE=%CMAKE_TOOLCHAIN% ^ | ||
-DCMAKE_INSTALL_PREFIX=%cd%/install | ||
cmake --build build/PlotJuggler --config Release --parallel --target install | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[requires] | ||
protobuf/3.21.1 | ||
mosquitto/2.0.14 | ||
zeromq/4.3.4 | ||
|
||
[generators] | ||
CMakeDeps | ||
CMakeToolchain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
plotjuggler_plugins/DataStreamMQTT/cmake/Findmosquitto.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# - Find libmosquitto | ||
# Find the native libmosquitto includes and libraries | ||
# | ||
# mosquitto_INCLUDE_DIR - where to find mosquitto.h, etc. | ||
# mosquitto_LIBRARIES - List of libraries when using libmosquitto. | ||
# mosquitto_FOUND - True if libmosquitto found. | ||
|
||
if (NOT mosquitto_INCLUDE_DIR) | ||
find_path(mosquitto_INCLUDE_DIR mosquitto.h) | ||
endif() | ||
|
||
if (NOT mosquitto_LIBRARY) | ||
find_library( | ||
mosquitto_LIBRARY | ||
NAMES mosquitto) | ||
endif() | ||
|
||
include(FindPackageHandleStandardArgs) | ||
|
||
find_package_handle_standard_args( | ||
MOSQUITTO DEFAULT_MSG | ||
mosquitto_LIBRARY mosquitto_INCLUDE_DIR) | ||
|
||
message(STATUS "libmosquitto include dir: ${MOSQUITTO_INCLUDE_DIR}") | ||
message(STATUS "libmosquitto: ${MOSQUITTO_LIBRARY}") | ||
set(mosquitto_LIBRARIES ${mosquitto_LIBRARY}) | ||
|
||
mark_as_advanced(mosquitto_INCLUDE_DIR mosquitto_LIBRARIES) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.