diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmExportFileGenerator.cxx | 23 | ||||
-rw-r--r-- | Source/cmInstallCommandArguments.cxx | 5 |
2 files changed, 23 insertions, 5 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 2ce4458..8f83c02 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -286,6 +286,27 @@ static bool checkInterfaceDirs(const std::string &prepro, } //---------------------------------------------------------------------------- +static void prefixItems(std::string &exportDirs) +{ + std::vector<std::string> entries; + cmGeneratorExpression::Split(exportDirs, entries); + exportDirs = ""; + const char *sep = ""; + for(std::vector<std::string>::const_iterator ei = entries.begin(); + ei != entries.end(); ++ei) + { + exportDirs += sep; + sep = ";"; + if (!cmSystemTools::FileIsFullPath(ei->c_str()) + && ei->find("${_IMPORT_PREFIX}") == std::string::npos) + { + exportDirs += "${_IMPORT_PREFIX}/"; + } + exportDirs += *ei; + } +} + +//---------------------------------------------------------------------------- void cmExportFileGenerator::PopulateIncludeDirectoriesInterface( cmTargetExport *tei, cmGeneratorExpression::PreprocessContext preprocessRule, @@ -330,6 +351,8 @@ void cmExportFileGenerator::PopulateIncludeDirectoriesInterface( return; } + prefixItems(exportDirs); + std::string includes = (input?input:""); const char* sep = input ? ";" : ""; includes += sep + exportDirs; diff --git a/Source/cmInstallCommandArguments.cxx b/Source/cmInstallCommandArguments.cxx index 91ea861..236ca1f 100644 --- a/Source/cmInstallCommandArguments.cxx +++ b/Source/cmInstallCommandArguments.cxx @@ -228,11 +228,6 @@ void cmInstallCommandIncludesArgument::Parse( for ( ; it != args->end(); ++it) { std::string dir = *it; - if (!cmSystemTools::FileIsFullPath(it->c_str()) - && cmGeneratorExpression::Find(*it) == std::string::npos) - { - dir = "$<INSTALL_PREFIX>/" + dir; - } cmSystemTools::ConvertToUnixSlashes(dir); this->IncludeDirs.push_back(dir); } |