From e2925a0ade8595d5b85b8e7f8b865c22d2252ec5 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Mon, 17 Aug 2020 19:12:16 -0700 Subject: [PATCH] disambiguate lib/ingraphs/*.c #includes Related to #1785. --- lib/ingraphs/CMakeLists.txt | 13 +++++++------ lib/ingraphs/Makefile.am | 1 + lib/ingraphs/ingraphs.c | 2 +- lib/ingraphs/ingraphs.vcxproj | 4 ++-- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/ingraphs/CMakeLists.txt b/lib/ingraphs/CMakeLists.txt index 547b97c57..4fee0180a 100644 --- a/lib/ingraphs/CMakeLists.txt +++ b/lib/ingraphs/CMakeLists.txt @@ -1,9 +1,3 @@ -include_directories( - ${CMAKE_CURRENT_SOURCE_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph -) - add_library(ingraphs STATIC # Header files ingraphs.h @@ -11,3 +5,10 @@ add_library(ingraphs STATIC # Source files ingraphs.c ) + +target_include_directories(ingraphs PRIVATE + ${GRAPHVIZ_LIB_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph +) diff --git a/lib/ingraphs/Makefile.am b/lib/ingraphs/Makefile.am index 90d444a9c..c25abcd59 100644 --- a/lib/ingraphs/Makefile.am +++ b/lib/ingraphs/Makefile.am @@ -2,6 +2,7 @@ ## Process this file with automake to produce Makefile.in AM_CPPFLAGS = \ + -I$(top_srcdir)/lib \ -I$(top_srcdir)/lib/cgraph \ -I$(top_srcdir)/lib/cdt diff --git a/lib/ingraphs/ingraphs.c b/lib/ingraphs/ingraphs.c index 7f0c6fb11..bab9bc60b 100644 --- a/lib/ingraphs/ingraphs.c +++ b/lib/ingraphs/ingraphs.c @@ -27,7 +27,7 @@ typedef struct { extern void agsetfile(char *); -#include "ingraphs.h" +#include /* nextFile: * Set next available file. diff --git a/lib/ingraphs/ingraphs.vcxproj b/lib/ingraphs/ingraphs.vcxproj index 4ee57d5af..48d32f4af 100644 --- a/lib/ingraphs/ingraphs.vcxproj +++ b/lib/ingraphs/ingraphs.vcxproj @@ -59,7 +59,7 @@ EditAndContinue true 4996 - $(SolutionDir)windows\include;%(AdditionalIncludeDirectories) + $(SolutionDir)windows\include;$(SolutionDir)lib;%(AdditionalIncludeDirectories) @@ -70,7 +70,7 @@ Level4 true 4996 - $(SolutionDir)windows\include;%(AdditionalIncludeDirectories) + $(SolutionDir)windows\include;$(SolutionDir)lib;%(AdditionalIncludeDirectories) -- 2.40.0