diff options
author | Mark Jansen <mark.jansen@reactos.org> | 2020-09-25 20:13:45 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-09-30 16:11:54 (GMT) |
commit | 7bda9a7fc78cfe43fe7f0d98bea41158bf75433e (patch) | |
tree | ce40e91f34cc34873d26244fd711e6498c22699c /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | d91c3e33cbf9592f90f65bd7d990a8b54ad140d1 (diff) | |
download | CMake-7bda9a7fc78cfe43fe7f0d98bea41158bf75433e.zip CMake-7bda9a7fc78cfe43fe7f0d98bea41158bf75433e.tar.gz CMake-7bda9a7fc78cfe43fe7f0d98bea41158bf75433e.tar.bz2 |
VS: Make ImportLibary generation optional
Fixes: #21180
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index a7b90b4..c025814 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -3791,12 +3791,14 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions( std::string pdb = cmStrCat(this->GeneratorTarget->GetPDBDirectory(config), '/', targetNames.PDB); - std::string imLib = - cmStrCat(this->GeneratorTarget->GetDirectory( - config, cmStateEnums::ImportLibraryArtifact), - '/', targetNames.ImportLibrary); + if (!targetNames.ImportLibrary.empty()) { + std::string imLib = + cmStrCat(this->GeneratorTarget->GetDirectory( + config, cmStateEnums::ImportLibraryArtifact), + '/', targetNames.ImportLibrary); - linkOptions.AddFlag("ImportLibrary", imLib); + linkOptions.AddFlag("ImportLibrary", imLib); + } linkOptions.AddFlag("ProgramDataBaseFile", pdb); // A Windows Runtime component uses internal .NET metadata, |