summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallCommand.cxx
diff options
context:
space:
mode:
authorJens Carl <jcarl@teradici.com>2021-05-06 19:45:56 (GMT)
committerJens Carl <jcarl@teradici.com>2021-05-06 22:29:51 (GMT)
commitd71a7cc19d6e03f89581efdaa8d63db216184d40 (patch)
tree2d777e51528e7c7c7218f10dde2d2b3ee3fd4919 /Source/cmInstallCommand.cxx
parent5cbbe3d301838b361f7ff9ae7e09dc10ce089957 (diff)
downloadCMake-d71a7cc19d6e03f89581efdaa8d63db216184d40.zip
CMake-d71a7cc19d6e03f89581efdaa8d63db216184d40.tar.gz
CMake-d71a7cc19d6e03f89581efdaa8d63db216184d40.tar.bz2
install(FILES): Allow installation of symlinks to directory
Allow symbolic links to a directory to be installed via install(FILES ...). Fixes: #22159
Diffstat (limited to 'Source/cmInstallCommand.cxx')
-rw-r--r--Source/cmInstallCommand.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index 7788db3..8a34f91 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -1482,7 +1482,8 @@ bool Helper::MakeFilesFullPath(const char* modeName,
}
// Make sure the file is not a directory.
- if (gpos == std::string::npos && cmSystemTools::FileIsDirectory(file)) {
+ if (gpos == std::string::npos && !cmSystemTools::FileIsSymlink(file) &&
+ cmSystemTools::FileIsDirectory(file)) {
this->SetError(
cmStrCat(modeName, " given directory \"", relFile, "\" to install."));
return false;