]> granicus.if.org Git - graphviz/commitdiff
cgraph++: include cgraph.h without the cgraph directory prefix in AGraph.h
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Sun, 20 Feb 2022 09:33:45 +0000 (10:33 +0100)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 22 Feb 2022 06:57:01 +0000 (07:57 +0100)
This makes it possible to use AGraph.h from the install directory
where cgraph.h is not located under this prefix.

Towards https://gitlab.com/graphviz/graphviz/-/issues/2196.

lib/cgraph++/AGraph.h
lib/cgraph++/CMakeLists.txt

index 16d77343ac6b496ac14fb6994c91b2dca488ce9b..03eb116541d4f32bf9d4f2ab9883ba4ec92f4670 100644 (file)
@@ -3,7 +3,7 @@
 #include <string>
 #include <utility>
 
-#include <cgraph/cgraph.h>
+#include <cgraph.h>
 
 #ifdef GVDLL
 #if cgraph___EXPORTS // CMake's substitution of cgraph++_EXPORTS
index 1f0b725253d7c48d6dbeb1765b340dedfa2b0370..de896212523a392de4bd046e85566a32d6d12fcd 100644 (file)
@@ -8,6 +8,7 @@ set_property(TARGET cgraph++ PROPERTY CXX_STANDARD_REQUIRED ON)
 target_include_directories(cgraph++ PRIVATE
   ${GRAPHVIZ_LIB_DIR}
   ${GRAPHVIZ_LIB_DIR}/cdt
+  ${GRAPHVIZ_LIB_DIR}/cgraph
   ${CMAKE_CURRENT_SOURCE_DIR}
 )