mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-06 22:30:07 -05:00
CPack: Detect more URLs in CPACK_NSIS_MENU_LINKS (#10644)
Previously, only strings containing "http:" qualified as URLs when found in CPACK_NSIS_MENU_LINKS. Now, we use a regex to detect strings beginning with any of the following: ftp:// ftps:// http:// https:// news:// mailto: This commit also moves the caller of CreateMenuLinks outside the "if (cpackPackageExecutables)" block, allowing clients to use CPACK_NSIS_MENU_LINKS without also having CPACK_PACKAGE_EXECUTABLES defined. That bit of this commit fixes the remainder of the issue described in http://public.kitware.com/Bug/view.php?id=7828 Also, added a set(CPACK_NSIS_MENU_LINKS ...) to the CPackComponents test to enable verifying that all of this actually works.
This commit is contained in:
@@ -68,6 +68,16 @@ set(CPACK_PACKAGE_VERSION_MINOR "0")
|
||||
set(CPACK_PACKAGE_VERSION_PATCH "0")
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "CPack Component Example")
|
||||
|
||||
# Settings used when building NSIS installers
|
||||
set(CPACK_NSIS_MENU_LINKS
|
||||
"ftp://ftpserver" "Test Ftp Link"
|
||||
"ftps://ftpsserver" "Test Ftps Link"
|
||||
"http://www.cmake.org" "CMake Web Site"
|
||||
"https://github.com/" "Test Https Link"
|
||||
"mailto:kitware@kitware.com" "Test MailTo Link"
|
||||
"news://newsserver" "Test News Link"
|
||||
)
|
||||
|
||||
# Include CPack to introduce the appropriate targets
|
||||
include(CPack)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user