Skip to content

Commit cbd71ca

Browse files
committed
clang-format vs plugin: include the license
The vsix installer will show the license when it starts, and it would print an annoying message when there was none. While we're here, add a MoreInfoUrl. llvm-svn: 214237
1 parent 7306cf3 commit cbd71ca

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

clang/tools/clang-format-vs/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ if (BUILD_CLANG_FORMAT_VS_PLUGIN)
66
"${CMAKE_CURRENT_SOURCE_DIR}/ClangFormat/clang-format.exe"
77
DEPENDS clang-format)
88

9+
add_custom_target(clang_format_license
10+
${CMAKE_COMMAND} -E copy_if_different
11+
"${CLANG_SOURCE_DIR}/LICENSE.TXT"
12+
"${CMAKE_CURRENT_SOURCE_DIR}/ClangFormat/license.txt")
13+
914
if (NOT CLANG_FORMAT_VS_VERSION)
1015
set(CLANG_FORMAT_VS_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}")
1116
endif()
@@ -19,5 +24,5 @@ if (BUILD_CLANG_FORMAT_VS_PLUGIN)
1924
COMMAND ${CMAKE_COMMAND} -E copy_if_different
2025
"${CMAKE_CURRENT_SOURCE_DIR}/ClangFormat/bin/Release/ClangFormat.vsix"
2126
"${LLVM_TOOLS_BINARY_DIR}/${CMAKE_CFG_INTDIR}/ClangFormat.vsix"
22-
DEPENDS clang_format_exe_for_vsix)
27+
DEPENDS clang_format_exe_for_vsix clang_format_license)
2328
endif()

clang/tools/clang-format-vs/ClangFormat/ClangFormat.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@
181181
<Content Include="clang-format.exe">
182182
<IncludeInVSIX>true</IncludeInVSIX>
183183
</Content>
184+
<Content Include="license.txt">
185+
<IncludeInVSIX>true</IncludeInVSIX>
186+
</Content>
184187
<Content Include="Resources\Package.ico" />
185188
</ItemGroup>
186189
<ItemGroup>
@@ -227,4 +230,4 @@
227230
<Target Name="AfterBuild">
228231
</Target>
229232
-->
230-
</Project>
233+
</Project>

clang/tools/clang-format-vs/source.extension.vsixmanifest.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
<Version>@CLANG_FORMAT_VS_VERSION@</Version>
77
<Description xml:space="preserve">A tool to format C/C++/Obj-C code.</Description>
88
<Locale>1033</Locale>
9+
<MoreInfoUrl>http://clang.llvm.org/docs/ClangFormat.html</MoreInfoUrl>
10+
<License>license.txt</License>
911
<InstalledByMsi>false</InstalledByMsi>
1012
<SupportedProducts>
1113
<VisualStudio Version="10.0">

0 commit comments

Comments
 (0)