[PATCH] CMake: Some changes to package version naming:
Hans Wennborg
hans at chromium.org
Thu Nov 21 10:48:21 PST 2013
Hi rnk,
- Allow overriding PACKAGE_VERSION from the command-line
- Use PACKAGE_VERSION to set CPACK_PACKAGE_VERSION (used by the Win installer)
- Don't include the version number in the CPack install dir or registry key.
This allows for building RC releases easily: -DPACKAGE_VERSION="3.4-rc1", etc.
http://llvm-reviews.chandlerc.com/D2245
Files:
CMakeLists.txt
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -13,7 +13,9 @@
set(LLVM_VERSION_MAJOR 3)
set(LLVM_VERSION_MINOR 5)
-set(PACKAGE_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}svn")
+if (NOT PACKAGE_VERSION)
+ set(PACKAGE_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}svn")
+endif()
option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF)
@@ -36,16 +38,14 @@
set(PACKAGE_BUGREPORT "http://llvm.org/bugs/")
# Configure CPack.
+set(CPACK_PACKAGE_INSTALL_DIRECTORY "LLVM")
set(CPACK_PACKAGE_VENDOR "LLVM")
set(CPACK_PACKAGE_VERSION_MAJOR ${LLVM_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${LLVM_VERSION_MINOR})
-if( LLVM_APPEND_VC_REV )
- add_version_info_from_vcs(CPACK_PACKAGE_VERSION_PATCH)
-else()
- set(CPACK_PACKAGE_VERSION_PATCH "svn")
-endif()
+set(CPACK_PACKAGE_VERSION ${PACKAGE_VERSION})
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.TXT")
if(WIN32 AND NOT UNIX)
+ set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "LLVM")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}\\\\cmake\\\\nsis_logo.bmp")
set(CPACK_NSIS_MODIFY_PATH "ON")
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL "ON")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2245.1.patch
Type: text/x-patch
Size: 1280 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131121/e72cd894/attachment.bin>
More information about the cfe-commits
mailing list