Skip to content

Commit

Permalink
Merge pull request #3056 from traversaro/supportgraphviz9
Browse files Browse the repository at this point in the history
yarpviz: Support compilation with graphviz >= 9
  • Loading branch information
randaz81 authored Nov 29, 2023
2 parents 50cc9cd + 18e8303 commit cc2a18b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/release/yarp_3_9/yarpviz_graphviz9.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#### `yarpviz`

* Support compilation with Graphviz >= 9.
6 changes: 6 additions & 0 deletions extern/qgv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ if(Graphviz_DEFINITIONS)
target_compile_definitions(YARP_priv_qgvcore PRIVATE ${Graphviz_DEFINITIONS})
endif()

if(Graphviz_VERSION)
if(Graphviz_VERSION VERSION_GREATER_EQUAL 9.0)
target_compile_definitions(YARP_priv_qgvcore PRIVATE GRAPHVIZ_VERSION_GE_9)
endif()
endif()

set_property(TARGET YARP_priv_qgvcore PROPERTY FOLDER "Libraries/External")


Expand Down
2 changes: 2 additions & 0 deletions extern/qgv/qgv/QGVCore/private/QGVCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ class QGVCore
rdr.len = strlen(cp);
rdr.cur = 0;

#ifndef GRAPHVIZ_VERSION_GE_9
disc.mem = &AgMemDisc;
#endif
disc.id = &AgIdDisc;
disc.io = &memIoDisc;
g = agread (&rdr, &disc);
Expand Down

0 comments on commit cc2a18b

Please sign in to comment.