diff options
author | Brad King <brad.king@kitware.com> | 2019-07-15 11:41:43 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-07-15 11:41:52 (GMT) |
commit | d7e53b427428bc23778d1b094e8893df4573e22e (patch) | |
tree | e0a3870052ce31b0ecac6c0dc4631684d22d62f6 /Source/cmInstallCommand.cxx | |
parent | a92b7fd46bcf1ecd255290d84c691a244c8ecb26 (diff) | |
parent | 7ff9ab3b101b131bd4a91a459f66ce27f97f4757 (diff) | |
download | CMake-d7e53b427428bc23778d1b094e8893df4573e22e.zip CMake-d7e53b427428bc23778d1b094e8893df4573e22e.tar.gz CMake-d7e53b427428bc23778d1b094e8893df4573e22e.tar.bz2 |
Merge topic 'cleanup-gen-lookups'
7ff9ab3b10 Makefile: De-duplicate executable link rule lookup
79f5ef19fe De-duplicate checks for whether a platform uses Windows DLLs
22d3eb5d5e Refactor checks for whether a target has an import library
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3550
Diffstat (limited to 'Source/cmInstallCommand.cxx')
-rw-r--r-- | Source/cmInstallCommand.cxx | 8 |
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( |