瀏覽代碼

fix install target

Ken Martin 23 年之前
父節點
當前提交
b59f5ddb7f
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 1 1
      Source/cmInstallFilesCommand.cxx
  2. 2 2
      Source/cmInstallFilesCommand.h

+ 1 - 1
Source/cmInstallFilesCommand.cxx

@@ -63,7 +63,7 @@ void cmInstallFilesCommand::FinalPass()
       {
       {
       // replace any variables
       // replace any variables
       std::string temps = *s;
       std::string temps = *s;
-      testf = temps + ext;
+      testf = cmSystemTools::GetFilenameWithoutExtension(temps) + ext;
       // add to the result
       // add to the result
       targetSourceLists.push_back(testf);
       targetSourceLists.push_back(testf);
       }
       }

+ 2 - 2
Source/cmInstallFilesCommand.h

@@ -70,9 +70,9 @@ public:
   virtual const char* GetFullDocumentation()
   virtual const char* GetFullDocumentation()
     {
     {
     return
     return
-      "INSTALL_FILES(path extension srclist file file srclist ...)\n"
+      "INSTALL_FILES(path extension file file ...)\n"
       "INSTALL_FILES(path regexp)\n"
       "INSTALL_FILES(path regexp)\n"
-      "Create rules to install the listed files into the path. Path is relative to the variable CMAKE_INSTALL_PREFIX. There are two forms for this command. In the first the files can be specified explicitly or by referenceing source lists. All files must either have the extension specified or exist with the extension appended. A typical extension is .h etc... In the second form any files in the current directory that match the regular expression will be installed.";
+      "Create rules to install the listed files into the path. Path is relative to the variable CMAKE_INSTALL_PREFIX. There are two forms for this command. In the first the files can be specified explicitly. If a file specified already has an extension, that extension will be removed first. This is useful for providing lists of source files such as foo.cxx when you want the corresponding foo.h to be installed. A typical extension is .h etc... In the second form any files in the current directory that match the regular expression will be installed.";
     }
     }
   
   
   cmTypeMacro(cmInstallFilesCommand, cmCommand);
   cmTypeMacro(cmInstallFilesCommand, cmCommand);