]> granicus.if.org Git - graphviz/commitdiff
disambiguate lib/xdot/*.c #includes
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 23 Aug 2020 00:35:42 +0000 (17:35 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 10 Sep 2020 02:26:52 +0000 (19:26 -0700)
Related to #1785.

lib/xdot/CMakeLists.txt
lib/xdot/Makefile.am
lib/xdot/xdot.c
lib/xdot/xdot.vcxproj

index 530cf4bf75100b78444248ab61ff050f358ac4d3..afd07939fa97c40a6126ed36ce05e41fbc36edd0 100644 (file)
@@ -1,7 +1,5 @@
 add_definitions(-DEXPORT_XDOT)
 
-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-
 add_library(xdot SHARED
     # Header files
     xdot.h
@@ -10,6 +8,11 @@ add_library(xdot SHARED
     xdot.c
 )
 
+target_include_directories(xdot PRIVATE
+    ${GRAPHVIZ_LIB_DIR}
+    ${CMAKE_CURRENT_SOURCE_DIR}
+)
+
 # Installation location of library files
 install(
     TARGETS xdot
index d1ad6af16ae0372331772dabf0d04d49ca6923c0..40b81ff8c23c16975203280560a1f9e5cafff6a1 100644 (file)
@@ -8,6 +8,8 @@ XDOT_VERSION="4:0:0"
 pdfdir = $(pkgdatadir)/doc/pdf
 pkginclude_HEADERS = xdot.h
 
+AM_CPPFLAGS = -I$(top_srcdir)/lib
+
 noinst_LTLIBRARIES = libxdot_C.la
 lib_LTLIBRARIES = libxdot.la
 pkgconfig_DATA = libxdot.pc
index 4c5b8ab0e29cfef010e254792caa6ac66e424ed9..5dee3cd88115445ff6b0dc71d75ebcb5f394b072 100644 (file)
@@ -10,7 +10,7 @@
  * Contributors: See CVS logs. Details at http://www.graphviz.org/
  *************************************************************************/
 
-#include <xdot.h>
+#include <xdot/xdot.h>
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
index 68dccfbcfa16c00cc3df86104bc78106b5f765c6..d43ca494926ad76b65e62979983cc90ff16db584 100644 (file)
@@ -51,7 +51,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>$(ProjectDir);$(SolutionDir)\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>EXPORT_XDOT;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -70,7 +70,7 @@
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>$(ProjectDir);$(SolutionDir)\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>EXPORT_XDOT;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PrecompiledHeader />
       <WarningLevel>Level4</WarningLevel>