diff options
author | Soji Yamakawa <soji@andrew.cmu.edu> | 2016-11-04 16:02:22 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-11-09 21:19:07 (GMT) |
commit | 883bd34a1fa31273929c7baf2f43b3c6f5ec0c01 (patch) | |
tree | 4505cdc5e38feabd73d036374ce140160f07aeec /Source/cmVisualStudio10TargetGenerator.h | |
parent | 2a567c68ce6605071f3e21638560493b71ed2841 (diff) | |
download | CMake-883bd34a1fa31273929c7baf2f43b3c6f5ec0c01.zip CMake-883bd34a1fa31273929c7baf2f43b3c6f5ec0c01.tar.gz CMake-883bd34a1fa31273929c7baf2f43b3c6f5ec0c01.tar.bz2 |
VS: Treat libraries ending in `.targets` as msbuild imports
Generate `<Import Project="..." .../>` to import the `.targets` files
into `.vcxproj` files.
Closes: #16340
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.h')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h index c62be7e..9ecb089 100644 --- a/Source/cmVisualStudio10TargetGenerator.h +++ b/Source/cmVisualStudio10TargetGenerator.h @@ -41,6 +41,12 @@ private: { }; + struct TargetsFileAndConfigs + { + std::string File; + std::vector<std::string> Configs; + }; + std::string ConvertPath(std::string const& path, bool forceRelative); void ConvertToWindowsSlash(std::string& s); void WriteString(const char* line, int indentLevel); @@ -77,6 +83,7 @@ private: std::string const& version); void WriteCommonMissingFiles(const std::string& manifestFile); void WriteTargetSpecificReferences(); + void WriteTargetsFileReferences(); bool ComputeClOptions(); bool ComputeClOptions(std::string const& configName); @@ -92,6 +99,8 @@ private: std::vector<std::string> const& includes); bool ComputeLinkOptions(); bool ComputeLinkOptions(std::string const& config); + bool ComputeLibOptions(); + bool ComputeLibOptions(std::string const& config); void WriteLinkOptions(std::string const& config); void WriteMidlOptions(std::string const& config, std::vector<std::string> const& includes); @@ -106,7 +115,10 @@ private: void WriteApplicationTypeSettings(); bool OutputSourceSpecificFlags(cmSourceFile const* source); void AddLibraries(cmComputeLinkInformation& cli, - std::vector<std::string>& libVec); + std::vector<std::string>& libVec, + std::vector<std::string>& vsTargetVec); + void AddTargetsFileAndConfigPair(std::string const& targetsFile, + std::string const& config); void WriteLibOptions(std::string const& config); void WriteManifestOptions(std::string const& config); void WriteEvents(std::string const& configName); @@ -138,6 +150,7 @@ private: OptionsMap LinkOptions; std::string PathToVcxproj; std::vector<std::string> Configurations; + std::vector<TargetsFileAndConfigs> TargetsFileAndConfigsVec; cmGeneratorTarget* GeneratorTarget; cmMakefile* Makefile; std::string Platform; |