diff options
author | Brad King <brad.king@kitware.com> | 2013-07-26 13:01:06 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-07-26 13:01:06 (GMT) |
commit | c82b1cbe83d8738815fb741432f03533c033a236 (patch) | |
tree | 5e1565e75dd77b5a80e13e58bf6038a04240c27d /Source/cmExportFileGenerator.cxx | |
parent | 003154f62c2048538633215fa561e95cc094a6e3 (diff) | |
parent | 650e61f833c2cc3ace8405a22eb80a10cfc6187c (diff) | |
download | CMake-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.cxx | 12 |
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()) { |