File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.7 )
22
3- project (plotjuggler_can_plugins)
3+ if ( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
4+ # Standalone build, call project and look for PlotJuggler
5+ project (plotjuggler_can_plugins)
46
5- set (CMAKE_MODULE_PATH
6- ${CMAKE_MODULE_PATH}
7- "${CMAKE_CURRENT_SOURCE_DIR} /cmake"
8- )
7+ list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR} /cmake" )
8+ find_package (PlotJuggler REQUIRED )
9+ else ()
10+ # Included from project (assuming from PlotJuggler)
11+ # Set PlotJuggler_LIBRARY manually since find_package fails in this configuration.
12+ set (PlotJuggler_LIBRARY plotjuggler_base)
13+ endif ()
914
1015set (CMAKE_INCLUDE_CURRENT_DIR ON )
1116set (CMAKE_AUTOMOC ON )
@@ -33,7 +38,6 @@ find_package(Qt5 REQUIRED COMPONENTS
3338find_package (Qt5 OPTIONAL_COMPONENTS
3439 SerialBus
3540)
36- find_package (PlotJuggler REQUIRED )
3741
3842include_directories (
3943 ${Qt5Core_INCLUDE_DIRS}
@@ -42,7 +46,7 @@ include_directories(
4246 ${Qt5Xml_INCLUDE_DIRS}
4347 ${PlotJuggler_INCLUDE_DIRS}
4448 ${Qt5Svg_INCLUDE_DIRS}
45- ./ 3rdparty/dbcppp/include
49+ 3rdparty/dbcppp/include
4650)
4751
4852set (PJ_LIBRARIES
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ To build any plugin, PlotJuggler must be installed in your system.
1717
1818For instance, in Linux, you should perform a full compilation and installation:
1919
20- ```
20+ ``` BASH
2121git clone --recurse-submodules https://github.com/facontidavide/PlotJuggler.git
2222cd PlotJuggler
2323mkdir build; cd build
@@ -26,7 +26,7 @@ make -j
2626sudo make install
2727```
2828After successfull installation of PlotJuggler, one can build DataLoadCAN and DataStreamCAN plugins as follows.
29- ```
29+ ``` BASH
3030git clone --recurse-submodules https://github.com/PlotJuggler/plotjuggler-CAN-dbs.git
3131cd plotjuggler-CAN-dbs
3232mkdir build; cd build
3535
3636```
3737
38+ An alternative approach is including this project in a local copy of PlotJuggler. This approach might be preferable on Windows or AppImage builds
39+ ``` BASH
40+ git clone --recurse-submodules https://github.com/facontidavide/PlotJuggler.git
41+ cd PlotJuggler/plotjuggler_plugins
42+ git clone --recurse-submodules https://github.com/PlotJuggler/plotjuggler-CAN-dbs.git
43+ # Add the following line in the CMakeList.txt of the PlotJuggler, just after other plugin include lines
44+ # add_subdirectory( plotjuggler_plugins/plotjuggler-CAN-dbs )
45+ cd ../; mkdir build; cd build # Create a build folder in the root of PlotJuggler
46+ cmake ..
47+ make -j
48+ sudo make install # In this approach, system-wide install is optional, you can diretly use the PJ inside the bin with CAN plugins included
49+ ```
50+
3851# Using the plugins
3952
4053After building the plugins, one needs to include build directory to the plugins directory of the PlotJuggler.
You can’t perform that action at this time.
0 commit comments