]> granicus.if.org Git - clang/commitdiff
clang-format vs plugin: include the license
authorHans Wennborg <hans@hanshq.net>
Tue, 29 Jul 2014 22:34:53 +0000 (22:34 +0000)
committerHans Wennborg <hans@hanshq.net>
Tue, 29 Jul 2014 22:34:53 +0000 (22:34 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214237 91177308-0d34-0410-b5e6-96231b3b80d8

tools/clang-format-vs/CMakeLists.txt
tools/clang-format-vs/ClangFormat/ClangFormat.csproj
tools/clang-format-vs/source.extension.vsixmanifest.in

index b1101928aa51d9b822623f6bbd663449b598b824..0a50a6a8c42694caeab6458423072521566fbe89 100644 (file)
@@ -6,6 +6,11 @@ if (BUILD_CLANG_FORMAT_VS_PLUGIN)
       "${CMAKE_CURRENT_SOURCE_DIR}/ClangFormat/clang-format.exe"
       DEPENDS clang-format)
 
+  add_custom_target(clang_format_license
+      ${CMAKE_COMMAND} -E copy_if_different
+      "${CLANG_SOURCE_DIR}/LICENSE.TXT"
+      "${CMAKE_CURRENT_SOURCE_DIR}/ClangFormat/license.txt")
+
   if (NOT CLANG_FORMAT_VS_VERSION)
     set(CLANG_FORMAT_VS_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}")
   endif()
@@ -19,5 +24,5 @@ if (BUILD_CLANG_FORMAT_VS_PLUGIN)
       COMMAND ${CMAKE_COMMAND} -E copy_if_different
       "${CMAKE_CURRENT_SOURCE_DIR}/ClangFormat/bin/Release/ClangFormat.vsix"
       "${LLVM_TOOLS_BINARY_DIR}/${CMAKE_CFG_INTDIR}/ClangFormat.vsix"
-      DEPENDS clang_format_exe_for_vsix)
+      DEPENDS clang_format_exe_for_vsix clang_format_license)
 endif()
index 2f49221d14b356b3625c157f2417fa21bd066d75..709b33d6fa2299c0cea0cc2248e58fa0efa182a1 100644 (file)
     <Content Include="clang-format.exe">\r
       <IncludeInVSIX>true</IncludeInVSIX>\r
     </Content>\r
+    <Content Include="license.txt">\r
+      <IncludeInVSIX>true</IncludeInVSIX>\r
+    </Content>\r
     <Content Include="Resources\Package.ico" />\r
   </ItemGroup>\r
   <ItemGroup>\r
   <Target Name="AfterBuild">\r
   </Target>\r
   -->\r
-</Project>
\ No newline at end of file
+</Project>\r
index ed0e72e35512048722acbf34cbfd79fb6c7a8e67..a28bb3c99c4330ba5bbdf938445f68eb934e239e 100644 (file)
@@ -6,6 +6,8 @@
     <Version>@CLANG_FORMAT_VS_VERSION@</Version>\r
     <Description xml:space="preserve">A tool to format C/C++/Obj-C code.</Description>\r
     <Locale>1033</Locale>\r
+    <MoreInfoUrl>http://clang.llvm.org/docs/ClangFormat.html</MoreInfoUrl>\r
+    <License>license.txt</License>\r
     <InstalledByMsi>false</InstalledByMsi>\r
     <SupportedProducts>\r
       <VisualStudio Version="10.0">\r