summaryrefslogtreecommitdiff
path: root/Source/cmInstallCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-03-19 10:00:36 -0400
committerBrad King <brad.king@kitware.com>2007-03-19 10:00:36 -0400
commitfc7c43346318744d05829579e6312aecddc66207 (patch)
treec5189c40170f90423c4b2a0cf72a5610282d1d8e /Source/cmInstallCommand.cxx
parent43589ec702cd037ed6b5c9f2c8b7558f4cb8801b (diff)
downloadcmake-fc7c43346318744d05829579e6312aecddc66207.tar.gz
ENH: Added support for import libraries created by executable and module targets. The module import libraries should never be used but some windows compilers always create them for .dll files since there is no distinction from shared libraries on that platform. The executable import libraries may be used to create modules that when loaded bind to symbols from the executables. This is an enhancement related to bug#4210 though not requested by it explicitly.
Diffstat (limited to 'Source/cmInstallCommand.cxx')
-rw-r--r--Source/cmInstallCommand.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index d270c77d3d..5244b9f9cd 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -532,6 +532,20 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
this->SetError(e.str().c_str());
return false;
}
+
+ // 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)
+ {
+ // The import library uses the ARCHIVE properties.
+ this->Makefile->AddInstallGenerator(
+ new cmInstallTargetGenerator(target, archive_dest.c_str(), true,
+ archive_permissions.c_str(),
+ archive_configurations,
+ archive_component.c_str(),
+ true));
+ }
}
break;
default: