Bläddra i källkod

BUG: Do not install the import library for an executable that does not have ENABLE_EXPORTS set.

Brad King 18 år sedan
förälder
incheckning
53f39ad566
1 ändrade filer med 2 tillägg och 1 borttagningar
  1. 2 1
      Source/cmInstallCommand.cxx

+ 2 - 1
Source/cmInstallCommand.cxx

@@ -573,7 +573,8 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
         // On DLL platforms an executable may also have an import
         // library.  Install it to the archive destination if it
         // exists.
-        if(dll_platform && archive_destination)
+        if(dll_platform && archive_destination &&
+           target.GetPropertyAsBool("ENABLE_EXPORTS"))
           {
           // The import library uses the ARCHIVE properties.
           archiveGenerator = new cmInstallTargetGenerator(target,