diff options
author | Brad King <brad.king@kitware.com> | 2018-03-12 17:40:12 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-03-12 17:40:44 (GMT) |
commit | fac050ec8d10f7ad8488ff214f8a556a307c46af (patch) | |
tree | 32289a87b45d896d2754e48b26499e3e97b28790 | |
parent | 725b0cab863aae5b78bc252f8174b8362954dcab (diff) | |
parent | 2dc2a3eb15c331aa2b953d995d304a6befc0aca4 (diff) | |
download | CMake-fac050ec8d10f7ad8488ff214f8a556a307c46af.zip CMake-fac050ec8d10f7ad8488ff214f8a556a307c46af.tar.gz CMake-fac050ec8d10f7ad8488ff214f8a556a307c46af.tar.bz2 |
Merge topic 'update-dllplatform'
2dc2a3eb15 Identify DLL platforms via CMAKE_IMPORT_LIBRARY_SUFFIX
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1832
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 4 | ||||
-rw-r--r-- | Source/cmInstallCommand.cxx | 5 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 8cdba93..b9e2978 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -132,8 +132,8 @@ cmGeneratorTarget::cmGeneratorTarget(cmTarget* t, cmLocalGenerator* lg) this->SourceEntries, true); this->DLLPlatform = - (this->Makefile->IsOn("WIN32") || this->Makefile->IsOn("CYGWIN") || - this->Makefile->IsOn("MINGW")); + strcmp(this->Makefile->GetSafeDefinition("CMAKE_IMPORT_LIBRARY_SUFFIX"), + "") != 0; this->PolicyMap = t->PolicyMap; } diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index 008a5e0..b5291a1 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -5,6 +5,7 @@ #include "cmsys/Glob.hxx" #include <sstream> #include <stddef.h> +#include <string.h> #include <utility> #include "cmAlgorithms.h" @@ -334,8 +335,8 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args) // Check whether this is a DLL platform. bool dll_platform = - (this->Makefile->IsOn("WIN32") || this->Makefile->IsOn("CYGWIN") || - this->Makefile->IsOn("MINGW")); + strcmp(this->Makefile->GetSafeDefinition("CMAKE_IMPORT_LIBRARY_SUFFIX"), + "") != 0; for (std::string const& tgt : targetList.GetVector()) { diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 70387ae..6137223 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -188,8 +188,8 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, // Check whether this is a DLL platform. this->DLLPlatform = - (this->Makefile->IsOn("WIN32") || this->Makefile->IsOn("CYGWIN") || - this->Makefile->IsOn("MINGW")); + strcmp(this->Makefile->GetSafeDefinition("CMAKE_IMPORT_LIBRARY_SUFFIX"), + "") != 0; // Check whether we are targeting an Android platform. this->IsAndroid = |