diff options
Diffstat (limited to 'Source/cmExportTryCompileFileGenerator.cxx')
-rw-r--r-- | Source/cmExportTryCompileFileGenerator.cxx | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/Source/cmExportTryCompileFileGenerator.cxx b/Source/cmExportTryCompileFileGenerator.cxx index 75f2651ba..819ac371e 100644 --- a/Source/cmExportTryCompileFileGenerator.cxx +++ b/Source/cmExportTryCompileFileGenerator.cxx @@ -31,8 +31,10 @@ bool cmExportTryCompileFileGenerator::GenerateMainFile(std::ostream& os) ImportPropertyMap properties; - this->FindTargets("INTERFACE_INCLUDE_DIRECTORIES", te, emittedDeps); - this->FindTargets("INTERFACE_COMPILE_DEFINITIONS", te, emittedDeps); +#define FIND_TARGETS(PROPERTY) \ + this->FindTargets(#PROPERTY, te, emittedDeps); + + CM_FOR_EACH_TRANSITIVE_PROPERTY_NAME(FIND_TARGETS) this->PopulateProperties(te, properties, emittedDeps); @@ -91,7 +93,9 @@ cmExportTryCompileFileGenerator::PopulateProperties(cmTarget* target, { properties[i->first] = i->second.GetValue(); - if(i->first.find("IMPORTED_LINK_INTERFACE_LIBRARIES") == 0) + if(i->first.find("IMPORTED_LINK_INTERFACE_LIBRARIES") == 0 + || i->first.find("IMPORTED_LINK_DEPENDENT_LIBRARIES") == 0 + || i->first.find("INTERFACE_LINK_LIBRARIES") == 0) { const std::string libs = i->second.GetValue(); @@ -112,3 +116,18 @@ cmExportTryCompileFileGenerator::PopulateProperties(cmTarget* target, } } } +std::string +cmExportTryCompileFileGenerator::InstallNameDir(cmTarget* target, + const std::string& config) +{ + std::string install_name_dir; + + cmMakefile* mf = target->GetMakefile(); + if(mf->IsOn("CMAKE_PLATFORM_HAS_INSTALLNAME")) + { + install_name_dir = + target->GetInstallNameDirForBuildTree(config.c_str()); + } + + return install_name_dir; +} |