From fef9c0aa62cb289e0b6606bbeba073ba45808a19 Mon Sep 17 00:00:00 2001 From: Dario Lombardo Date: Sat, 10 Nov 2018 14:25:36 +0100 Subject: [PATCH] cmake: Add CMakeGraphVizOptions.cmake to improve the generated layout. Adjust the CMake configuration to generate grapvhiz files with an improved layout. Documentation: https://cmake.org/cmake/help/latest/module/CMakeGraphVizOptions.html To generate a dependency graph from the build directory (example): cmake . --graphviz=wireshark.dot fdp wireshark.dot -Tpdf -o wireshark.pdf Change-Id: Icf238668004224b9d373d8080e549b9b583f676c Reviewed-on: https://code.wireshark.org/review/30564 Reviewed-by: Peter Wu Reviewed-by: Michael Mann --- CMakeGraphVizOptions.cmake | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 CMakeGraphVizOptions.cmake diff --git a/CMakeGraphVizOptions.cmake b/CMakeGraphVizOptions.cmake new file mode 100644 index 0000000000..35748c28fc --- /dev/null +++ b/CMakeGraphVizOptions.cmake @@ -0,0 +1,11 @@ +# CMake configuration to control the look and contents of generated graphviz files. +# +# Documentation: https://cmake.org/cmake/help/latest/module/CMakeGraphVizOptions.html +# +# To generate a dependency graph from the build directory: +# +# cmake . --graphviz=wireshark.dot +# fdp wireshark.dot -Tpdf -o wireshark.pdf + +set(GRAPHVIZ_GRAPH_NAME "Wireshark dependency graph") +set(GRAPHVIZ_GRAPH_HEADER \tsize="5!" \n\tgraph[splines="true",forcelabels="true",overlap="false"] \n)