Skip to content

Commit

Permalink
Merge branch 'main' of github.com:facontidavide/PlotJuggler
Browse files Browse the repository at this point in the history
  • Loading branch information
facontidavide committed Jan 26, 2024
2 parents 379a012 + 958f3a6 commit 0931800
Show file tree
Hide file tree
Showing 33 changed files with 12,233 additions and 8,774 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
cmake_minimum_required(VERSION 3.10.2)
# cmake version constrained by Ubuntu 20.04
cmake_minimum_required(VERSION 3.16.3)

PROJECT(plotjuggler LANGUAGES C CXX VERSION 3.8.9)

Expand Down
21 changes: 15 additions & 6 deletions COMPILE.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,29 @@ On Mac, the dependencies can be installed using [brew](https://brew.sh/) with th
brew install cmake qt@5 protobuf mosquitto zeromq zstd
```

If a newer version of qt is installed, you may need to temporarily link to qt5

```shell
brew link qt@5 --override
# brew link qt --override # Run once you are done building to restore the original linking
```

Add CMake into your env-vars to be detected by cmake

```shell
echo "export CPPFLAGS=\"-I/opt/homebrew/opt/qt@5/include\"" >> $HOME/.zshrc
echo "export PKG_CONFIG_PATH=\"/opt/homebrew/opt/qt@5/lib/pkgconfig\"" >> $HOME/.zshrc
echo "export LDFLAGS=\"/opt/homebrew/opt/qt@5/lib\"" >> $HOME/.zshrc
echo 'QT_HOME=$(brew --prefix qt@5) \
export CPPFLAGS="-I $QT_HOME/include" \
export PKG_CONFIG_PATH="$QT_HOME/lib/pkgconfig" \
export LDFLAGS="$QT_HOME/lib"' >> $HOME/.zshrc
```

If you don't want to permanently add them into your main file, you can try by just exporting locally in the current terminal with:

```shell
export CPPFLAGS="-I/opt/homebrew/opt/qt@5/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/qt@5/lib/pkgconfig"
export LDFLAGS="/opt/homebrew/opt/qt@5/lib"
QT_HOME=$(brew --prefix qt@5)
export CPPFLAGS="-I $QT_HOME/include"
export PKG_CONFIG_PATH="$QT_HOME/lib/pkgconfig"
export LDFLAGS="$QT_HOME/lib"
```

Clone the repository into **~/plotjuggler_ws**:
Expand Down
6 changes: 6 additions & 0 deletions plotjuggler_plugins/ParserProtobuf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ if( Protobuf_FOUND)
protobuf_parser.h
${UI_SRC} )

if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
find_library(ABSL_SPINLOCK_WAIT_LIB absl_spinlock_wait)

target_link_libraries(ProtobufParser ${ABSL_SPINLOCK_WAIT_LIB} )
endif()

target_link_libraries(ProtobufParser
${Qt5Widgets_LIBRARIES}
${Qt5Xml_LIBRARIES}
Expand Down
Loading

0 comments on commit 0931800

Please sign in to comment.