summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-07-12 17:36:15 (GMT)
committerBrad King <brad.king@kitware.com>2019-07-12 21:35:49 (GMT)
commit79f5ef19fe418efe2d9bfc55fcd16dfd75f18d49 (patch)
tree59b8b9e5e496443b9751533cb38398fb63cca5dc /Source/cmInstallCommand.cxx
parent22d3eb5d5e4ce9c6371ab709655928552453fbda (diff)
downloadCMake-79f5ef19fe418efe2d9bfc55fcd16dfd75f18d49.zip
CMake-79f5ef19fe418efe2d9bfc55fcd16dfd75f18d49.tar.gz
CMake-79f5ef19fe418efe2d9bfc55fcd16dfd75f18d49.tar.bz2
De-duplicate checks for whether a platform uses Windows DLLs
Diffstat (limited to 'Source/cmInstallCommand.cxx')
-rw-r--r--Source/cmInstallCommand.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index dba4bbb..750ed8c 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -389,10 +389,6 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
return true;
}
- // Check whether this is a DLL platform.
- bool dll_platform =
- !this->Makefile->GetSafeDefinition("CMAKE_IMPORT_LIBRARY_SUFFIX").empty();
-
for (std::string const& tgt : targetList) {
if (this->Makefile->IsAlias(tgt)) {
@@ -472,7 +468,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
// Shared libraries are handled differently on DLL and non-DLL
// platforms. All windows platforms are DLL platforms including
// cygwin. Currently no other platform is a DLL platform.
- if (dll_platform) {
+ if (target.IsDLLPlatform()) {
// When in namelink only mode skip all libraries on Windows.
if (namelinkMode == cmInstallTargetGenerator::NamelinkModeOnly) {
continue;
@@ -641,7 +637,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
// On DLL platforms an executable may also have an import
// library. Install it to the archive destination if it
// exists.
- if (dll_platform && !archiveArgs.GetDestination().empty() &&
+ if (target.IsDLLPlatform() && !archiveArgs.GetDestination().empty() &&
target.IsExecutableWithExports()) {
// The import library uses the ARCHIVE properties.
archiveGenerator = CreateInstallTargetGenerator(