summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-09-08 13:36:51 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-09-08 13:36:51 (GMT)
commit04657ee2f83cb446c5595090f256273a23be94a2 (patch)
tree2ac65fed70ad562137ecd9d478580528d9d1a159
parent4c674eba7ab7d431f535639553be8dcce14276c4 (diff)
parent290e4ce8a89819d6617fa404513d8a1629cafea7 (diff)
downloadCMake-04657ee2f83cb446c5595090f256273a23be94a2.zip
CMake-04657ee2f83cb446c5595090f256273a23be94a2.tar.gz
CMake-04657ee2f83cb446c5595090f256273a23be94a2.tar.bz2
Merge topic 'install-export-root-prefix'
290e4ce8 install: Fix computed import prefix in export files when it is "/"
-rw-r--r--Source/cmExportInstallFileGenerator.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx
index ceba69a..bcadaa0 100644
--- a/Source/cmExportInstallFileGenerator.cxx
+++ b/Source/cmExportInstallFileGenerator.cxx
@@ -122,7 +122,10 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os)
"PATH)\n";
dest = cmSystemTools::GetFilenamePath(dest);
}
- os << "\n";
+ os << "if(_IMPORT_PREFIX STREQUAL \"/\")\n"
+ << " set(_IMPORT_PREFIX \"\")\n"
+ << "endif()\n"
+ << "\n";
}
std::vector<std::string> missingTargets;