summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallCommand.cxx
diff options
context:
space:
mode:
authorStephan Szabo <stephan.szabo@sony.com>2018-03-08 18:26:56 (GMT)
committerBrad King <brad.king@kitware.com>2018-03-09 13:09:21 (GMT)
commit2dc2a3eb15c331aa2b953d995d304a6befc0aca4 (patch)
treea42fb062123284b06ac76a24edad8a2362ef93b5 /Source/cmInstallCommand.cxx
parent9ceafdfd4deec57c3a7f8650b2466da1d0aa0d3f (diff)
downloadCMake-2dc2a3eb15c331aa2b953d995d304a6befc0aca4.zip
CMake-2dc2a3eb15c331aa2b953d995d304a6befc0aca4.tar.gz
CMake-2dc2a3eb15c331aa2b953d995d304a6befc0aca4.tar.bz2
Identify DLL platforms via CMAKE_IMPORT_LIBRARY_SUFFIX
Use `CMAKE_IMPORT_LIBRARY_SUFFIX` to identify platforms that have DLL import libraries rather than memorizing a list of platform names. Fixes: #16801
Diffstat (limited to 'Source/cmInstallCommand.cxx')
-rw-r--r--Source/cmInstallCommand.cxx5
1 files changed, 3 insertions, 2 deletions
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()) {