summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Source/cmInstallCommand.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index 53a41730b1..dbe8d49e38 100644
--- a/Source/cmInstallCommand.cxx
+++ b/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,