summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallExportGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmInstallExportGenerator.cxx')
-rw-r--r--Source/cmInstallExportGenerator.cxx35
1 files changed, 33 insertions, 2 deletions
diff --git a/Source/cmInstallExportGenerator.cxx b/Source/cmInstallExportGenerator.cxx
index a61a8c0..e0ff82c 100644
--- a/Source/cmInstallExportGenerator.cxx
+++ b/Source/cmInstallExportGenerator.cxx
@@ -22,6 +22,7 @@
#include "cmTarget.h"
#include "cmInstallExportGenerator.h"
+#include "cmInstallFilesGenerator.h"
cmInstallExportGenerator::cmInstallExportGenerator(
const char* destination,
@@ -60,7 +61,7 @@ bool cmInstallExportGenerator::AddInstallLocations(cmTargetWithProperties* twp,
std::string propertyName = prefix;
propertyName += "LOCATION";
// check that this property doesn't exist yet and add it then
- if (twp->Properties.find(propertyName.c_str())== twp->Properties.end())
+ if (twp->Properties.find(propertyName.c_str()) == twp->Properties.end())
{
std::string destinationFilename = generator->GetDestination();
destinationFilename += "/";
@@ -83,7 +84,7 @@ bool cmInstallExportGenerator::AddInstallLocations(cmTargetWithProperties* twp,
propertyName += prefix;
propertyName += "LOCATION";
// check that this property doesn't exist yet and add it then
- if (twp->Properties.find(propertyName.c_str())== twp->Properties.end())
+ if (twp->Properties.find(propertyName.c_str()) == twp->Properties.end())
{
std::string destinationFilename = generator->GetDestination();
destinationFilename += "/";
@@ -100,6 +101,31 @@ bool cmInstallExportGenerator::AddInstallLocations(cmTargetWithProperties* twp,
}
+bool cmInstallExportGenerator::AddInstallLocations(cmTargetWithProperties* twp,
+ cmInstallFilesGenerator* generator,
+ const char* propertyName)
+{
+ if (generator == 0) // nothing to do
+ {
+ return true;
+ }
+
+ if ((propertyName == 0) || (*propertyName == '\0'))
+ {
+ return false;
+ }
+
+ // check that this property doesn't exist yet and add it then
+ if (twp->Properties.find(propertyName) == twp->Properties.end())
+ {
+ twp->Properties[propertyName] = generator->GetDestination();
+ return true;
+ }
+
+ return false;
+}
+
+
bool cmInstallExportGenerator::SetExportSet(const char* name,
const std::vector<cmTargetExport*>* set)
{
@@ -152,6 +178,11 @@ bool cmInstallExportGenerator::SetExportSet(const char* name,
{
return false;
}
+ if (this->AddInstallLocations(targetWithProps, (*it)->HeaderGenerator,
+ "PUBLIC_HEADER_LOCATION") == false)
+ {
+ return false;
+ }
}
return true;