From 9a160871d0bc4233a71dfbf2ffcc888a940bb921 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 20 Sep 2012 23:22:24 +0200 Subject: [PATCH] Convert paths in INCLUDE_DIRECTORIES property to Unix slashes. Duplicate some of the logic from the include_directories command. --- Source/cmGeneratorTarget.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 91f16d102f..ec83b7ac5a 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -299,9 +299,14 @@ std::vector cmGeneratorTarget::GetIncludeDirectories() for(std::vector::const_iterator li = includes.begin(); li != includes.end(); ++li) { - if(uniqueIncludes.insert(*li).second) + std::string inc = *li; + if (!cmSystemTools::IsOff(inc.c_str())) { - orderedAndUniqueIncludes.push_back(*li); + cmSystemTools::ConvertToUnixSlashes(inc); + } + if(uniqueIncludes.insert(inc).second) + { + orderedAndUniqueIncludes.push_back(inc); } }