diff options
author | Brad King <brad.king@kitware.com> | 2007-03-19 14:00:36 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-03-19 14:00:36 (GMT) |
commit | fc7c43346318744d05829579e6312aecddc66207 (patch) | |
tree | c5189c40170f90423c4b2a0cf72a5610282d1d8e /Source/cmInstallTargetGenerator.cxx | |
parent | 43589ec702cd037ed6b5c9f2c8b7558f4cb8801b (diff) | |
download | CMake-fc7c43346318744d05829579e6312aecddc66207.zip CMake-fc7c43346318744d05829579e6312aecddc66207.tar.gz CMake-fc7c43346318744d05829579e6312aecddc66207.tar.bz2 |
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/cmInstallTargetGenerator.cxx')
-rw-r--r-- | Source/cmInstallTargetGenerator.cxx | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index 3acabec..fd92eab 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -208,11 +208,21 @@ cmInstallTargetGenerator { std::string targetName; std::string targetNameReal; + std::string targetNameImport; std::string targetNamePDB; target->GetExecutableNames(targetName, targetNameReal, - targetNamePDB, i->c_str()); - // Use the canonical name. - fname += targetName; + targetNameImport, targetNamePDB, + i->c_str()); + if(this->ImportLibrary) + { + // Use the import library name. + fname += targetNameImport; + } + else + { + // Use the canonical name. + fname += targetName; + } } else { @@ -259,11 +269,21 @@ std::string cmInstallTargetGenerator::GetScriptReference(cmTarget* target, { std::string targetName; std::string targetNameReal; + std::string targetNameImport; std::string targetNamePDB; target->GetExecutableNames(targetName, targetNameReal, - targetNamePDB, this->ConfigurationName); - // Use the canonical name. - return targetName; + targetNameImport, targetNamePDB, + this->ConfigurationName); + if(this->ImportLibrary) + { + // Use the import library name. + return targetNameImport; + } + else + { + // Use the canonical name. + return targetName; + } } else { |