Skip to content

Commit

Permalink
Use Installed jchart2d (#452)
Browse files Browse the repository at this point in the history
* starting to add support for python2

* remove jchart2d

* removed python2 stuff

* note that jchart2d is a dependency

* fixed inadvertent deletion

* added libjchart2d to tests

* Revert "remove jchart2d"

This reverts commit 03cd30a.

* Use system jchart2d if available

* Update docs/content/build-instructions.md

Co-authored-by: Ian Hilt <279639+ihilt@users.noreply.github.com>

---------

Co-authored-by: Ian Hilt <279639+ihilt@users.noreply.github.com>
  • Loading branch information
shayosler and ihilt authored Jun 8, 2023
1 parent 75ddf9c commit ab19a3a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

- name: Install Dependencies
run: |
sudo apt install liblua5.3-dev lua5.3
sudo apt install liblua5.3-dev lua5.3 libjchart2d-java
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build ${{env.CMAKE_FLAGS}} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
Expand Down
1 change: 1 addition & 0 deletions docs/content/build-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Required packages:

Optional packages (e.g., for language-specific support or building documentation):
- default-jdk
- libjchart2d-java # note: if not installed, jchart2d will be built from source
- doxygen
- liblua5.3-dev
- lua5.3
Expand Down
9 changes: 7 additions & 2 deletions lcm-java/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ elseif (Java_VERSION VERSION_LESS 1.9)
endif()
endif()

add_subdirectory(jchart2d-code)
# Use system version of jchart2d if available
find_jar(jchart2d_JAR jchart2d)
if(NOT jchart2d_JAR)
add_subdirectory(jchart2d-code)
set(jchart2d_JAR jchart2d)
endif()

set(lcm_java_sources
lcm/util/JImage.java
Expand Down Expand Up @@ -59,7 +64,7 @@ set(lcm_java_sources
)

add_jar(lcm-java
INCLUDE_JARS jchart2d
INCLUDE_JARS ${jchart2d_JAR}
SOURCES ${lcm_java_sources}
OUTPUT_NAME lcm
)
Expand Down

0 comments on commit ab19a3a

Please sign in to comment.