summaryrefslogtreecommitdiffstats
path: root/Source/cmExportFileGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-07-26 13:01:06 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-07-26 13:01:06 (GMT)
commitc82b1cbe83d8738815fb741432f03533c033a236 (patch)
tree5e1565e75dd77b5a80e13e58bf6038a04240c27d /Source/cmExportFileGenerator.cxx
parent003154f62c2048538633215fa561e95cc094a6e3 (diff)
parent650e61f833c2cc3ace8405a22eb80a10cfc6187c (diff)
downloadCMake-c82b1cbe83d8738815fb741432f03533c033a236.zip
CMake-c82b1cbe83d8738815fb741432f03533c033a236.tar.gz
CMake-c82b1cbe83d8738815fb741432f03533c033a236.tar.bz2
Merge topic 'install-interface-includes'
650e61f Add a convenient way to add the includes install dir to the INTERFACE.
Diffstat (limited to 'Source/cmExportFileGenerator.cxx')
-rw-r--r--Source/cmExportFileGenerator.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index 4de1aae..ba0d00b 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -277,27 +277,31 @@ static bool checkInterfaceDirs(const std::string &prepro,
//----------------------------------------------------------------------------
void cmExportFileGenerator::PopulateIncludeDirectoriesInterface(
- cmTarget *target,
+ cmTargetExport *tei,
cmGeneratorExpression::PreprocessContext preprocessRule,
ImportPropertyMap &properties,
std::vector<std::string> &missingTargets)
{
+ cmTarget *target = tei->Target;
assert(preprocessRule == cmGeneratorExpression::InstallInterface);
const char *propName = "INTERFACE_INCLUDE_DIRECTORIES";
const char *input = target->GetProperty(propName);
- if (!input)
+ if (!input && tei->InterfaceIncludeDirectories.empty())
{
return;
}
- if (!*input)
+ if (!*input && tei->InterfaceIncludeDirectories.empty())
{
// Set to empty
properties[propName] = "";
return;
}
- std::string prepro = cmGeneratorExpression::Preprocess(input,
+ std::string includes = (input?input:"");
+ const char* sep = input ? ";" : "";
+ includes += sep + tei->InterfaceIncludeDirectories;
+ std::string prepro = cmGeneratorExpression::Preprocess(includes,
preprocessRule);
if (!prepro.empty())
{