summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-08-11 13:07:42 (GMT)
committerBrad King <brad.king@kitware.com>2009-08-11 13:07:42 (GMT)
commit463b3f03bd848a345ab535d31be31d395fe66b13 (patch)
tree06594c0811edb4cdbbdc57e74acb153c1e8f818a /Source/cmTarget.cxx
parent0bc050677f71651ae7ef403ec063af06b6ecd751 (diff)
downloadCMake-463b3f03bd848a345ab535d31be31d395fe66b13.zip
CMake-463b3f03bd848a345ab535d31be31d395fe66b13.tar.gz
CMake-463b3f03bd848a345ab535d31be31d395fe66b13.tar.bz2
Create cmTarget DLL query methods
We creates methods IsDLLPlatform() and HasImportLibrary(). The former returns true on Windows. The latter returns whether the target has a DLL import library. It is true on Windows for shared libraries and executables with exports.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 8fdb16a..4885b07 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1023,6 +1023,14 @@ bool cmTarget::IsLinkable()
}
//----------------------------------------------------------------------------
+bool cmTarget::HasImportLibrary()
+{
+ return (this->DLLPlatform &&
+ (this->GetType() == cmTarget::SHARED_LIBRARY ||
+ this->IsExecutableWithExports()));
+}
+
+//----------------------------------------------------------------------------
bool cmTarget::IsFrameworkOnApple()
{
return (this->GetType() == cmTarget::SHARED_LIBRARY &&
@@ -3635,9 +3643,7 @@ void cmTarget::ComputeImportInfo(std::string const& desired_config,
// On a DLL platform there may be only IMPORTED_IMPLIB for a shared
// library or an executable with exports.
- bool allowImp =
- this->DLLPlatform && (this->GetType() == cmTarget::SHARED_LIBRARY ||
- this->IsExecutableWithExports());
+ bool allowImp = this->HasImportLibrary();
// Look for a mapping from the current project's configuration to
// the imported project's configuration.