[PATCH] Tweak the CMake package rules for Windows

Hans Wennborg hans at chromium.org
Thu Aug 15 10:29:01 PDT 2013


Hi rnk,

This tweaks the CMake rules for building an installation package. It tweaks the version string, sets the license file (the Windows installer will show this), adds an LLVM logo and makes the wizard show a "do you want to add this to the system path" dialog.

http://llvm-reviews.chandlerc.com/D1414

Files:
  CMakeLists.txt
  nsis_logo.bmp

Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -493,7 +493,16 @@
 set(CPACK_PACKAGE_VENDOR "LLVM")
 set(CPACK_PACKAGE_VERSION_MAJOR ${LLVM_VERSION_MAJOR})
 set(CPACK_PACKAGE_VERSION_MINOR ${LLVM_VERSION_MINOR})
-add_version_info_from_vcs(CPACK_PACKAGE_VERSION_PATCH)
+if( LLVM_APPEND_VC_REV )
+  add_version_info_from_vcs(CPACK_PACKAGE_VERSION_PATCH)
+else()
+  set(CPACK_PACKAGE_VERSION_PATCH "svn")
+endif()
+set(CPACK_RESOURCE_FILE_LICENSE "${LLVM_MAIN_SRC_DIR}/LICENSE.TXT")
+if(WIN32 AND NOT UNIX)
+  set(CPACK_PACKAGE_ICON "${LLVM_MAIN_SRC_DIR}\\\\nsis_logo.bmp")
+  set(CPACK_NSIS_MODIFY_PATH "ON")
+endif()
 include(CPack)
 
 # Workaround for MSVS10 to avoid the Dialog Hell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1414.1.patch
Type: text/x-patch
Size: 767 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130815/e33c8a68/attachment.bin>


More information about the cfe-commits mailing list