CMake merge requestshttps://gitlab.kitware.com/cmake/cmake/-/merge_requests2022-09-27T10:26:15-04:00https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7715CPack/NSIS: Add options to set makensis arguments2022-09-27T10:26:15-04:00Johnny JazeixCPack/NSIS: Add options to set makensis argumentsI've extended the original request that was only for the defines to all arguments according to https://documentation.help/CTRE-NSIS/Section3.1.html
Usage: `cmake.exe -DCPACK_NSIS_EXECUTABLE_PRE_ARGUMENTS="V1;Dversion=2.2" -DCPACK_NSIS_E...I've extended the original request that was only for the defines to all arguments according to https://documentation.help/CTRE-NSIS/Section3.1.html
Usage: `cmake.exe -DCPACK_NSIS_EXECUTABLE_PRE_ARGUMENTS="V1;Dversion=2.2" -DCPACK_NSIS_EXECUTABLE_POST_ARGUMENTS="Dtest" ..`
Fixes: #23446
Topic-rename: cpack-nsis-arguments-command-line3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7635CPack: re-use paths of tools discovered by CMakeFindBinUtils2022-12-17T05:50:07-05:00Matteo MartelliCPack: re-use paths of tools discovered by CMakeFindBinUtils`CMakeFindBinUtils.cmake` sets `CMAKE_<TOOL>` variables that in cross-compilation environments point to the toolchain specific executables: e.g. `CMAKE_OBJCOPY` might point to `<path_to_toolchain>/arm-poky-linux-gnueabi-objcopy`.
Howeve...`CMakeFindBinUtils.cmake` sets `CMAKE_<TOOL>` variables that in cross-compilation environments point to the toolchain specific executables: e.g. `CMAKE_OBJCOPY` might point to `<path_to_toolchain>/arm-poky-linux-gnueabi-objcopy`.
However, such variables are not exposed to CPack. This merge request is to let CPack internal modules re-use (a subset) of the already defined CMAKE_<TOOL> variables.
I am not sure whether this is best method to do so, I guess that another method might be to let the internal CPack module use the `HINTS ${_CMAKE_TOOLCHAIN_LOCATION}` find option as the CMakeFindBindUtils.cmake already does.
Also, please consider that I am new to cmake development and I might not have considered all the implications. Hope this helps anyway.3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7621CPack: Add support for presets2022-09-02T09:04:17-04:00Kyle EdwardsCPack: Add support for presetsFixes: #23117Fixes: #231173.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7563CPack: allow custom file extension in archive generator2022-09-07T09:44:19-04:00Andrey FilipenkovCPack: allow custom file extension in archive generatorCurrently file extensions used by CPack are hardcoded. This MR allows setting a custom archive extension with or without leading dot through new variable `CPACK_ARCHIVE_OUTPUT_EXTENSION`.
My primary goal was to be able to generate IPA f...Currently file extensions used by CPack are hardcoded. This MR allows setting a custom archive extension with or without leading dot through new variable `CPACK_ARCHIVE_OUTPUT_EXTENSION`.
My primary goal was to be able to generate IPA file (standard format to distribute iOS/tvOS apps which is just a zip with special structure) with CPack directly, as currently I have to perform manual renaming after running `cpack`. See example from my project: https://github.com/kambala-decapitator/vcmi/commit/476b8e396fb14f3f66ef0ad73b60ab53946b7722
Another use case would be e.g. using `.txz` instead of `.tar.xz`.
If you find that this feature makes sense, I'll proceed with adding documentation change.
Fixes: #238893.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7447CPack: support CPACK_PACKAGE_FILE_NAME in FreeBSD pkg generator2022-07-06T09:20:26-04:00Adriaan de GrootCPack: support CPACK_PACKAGE_FILE_NAME in FreeBSD pkg generatorThe underlying pkg library always produces a `<name>-<version>.pkg` file, so to follow `CPACK_PACKAGE_FILE_NAME` we need to detect that and rename appropriately.
While here:
- All supported FreeBSD versions are now using 1.17 or later,...The underlying pkg library always produces a `<name>-<version>.pkg` file, so to follow `CPACK_PACKAGE_FILE_NAME` we need to detect that and rename appropriately.
While here:
- All supported FreeBSD versions are now using 1.17 or later, which produces `.pkg` files. Drop support for older versions.
- Fix up some documentation where variables were listed in the wrong place as fallback.
Fixes #230343.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7290CPack: Support component names with special characters, too2022-06-10T17:51:47-04:00Deniz BahadirCPack: Support component names with special characters, tooThe `cpack_add_component` function from `CPackComponent.cmake` takes the name of a component and sets several variables for CPack. Those variables' names often contain the name of the given component.
However, that can lead to errors i...The `cpack_add_component` function from `CPackComponent.cmake` takes the name of a component and sets several variables for CPack. Those variables' names often contain the name of the given component.
However, that can lead to errors if such a component's name contains special characters as e.g. `:`.
Then again, it should be totally fine for a component's name to contain such characters.
And luckily, it seems to be quite simple to fix these errors in `CPackComponent.cmake`, which is what this merge-request does.
---
### Some background information for better understanding the problem:
CMake supports several special characters (e.g. `:`) in variable names, as long as such a variable is never referenced directly:
```cmake
set( VAR:WITH:SPECIAL:CHARACTERS "value" )
# message( STATUS "Direct reference = ${VAR:WITH:SPECIAL:CHARACTERS}" ) # ERROR!
set( INDIRECTION "VAR:WITH:SPECIAL:CHARACTERS" )
message( STATUS "Indirect reference = ${${INDIRECTION}}" ) # SUCCESS
```
Likewise, a `macro` which takes a variable `var` and references it to get its value (`${${var}}`) might trigger the same error if `var` contains special characters. Using a `function` instead does not trigger that error:
```cmake
macro( print_var_and_val_macro arg )
message( STATUS "${arg} = ${${arg}}" )
endmacro()
function( print_var_and_val_func arg )
message( STATUS "${arg} = ${${arg}}" )
endfunction()
set( VAR:WITH:SPECIAL:CHARACTERS "value" )
# print_var_and_val_macro( VAR:WITH:SPECIAL:CHARACTERS ) # ERROR
print_var_and_val_func( VAR:WITH:SPECIAL:CHARACTERS ) # SUCCESS
```
Topic-rename: cpack-component-special-chars3.24.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7280CPack/NuGet: Restore component packaging on Windows2022-05-19T09:40:07-04:00Alex TurbovCPack/NuGet: Restore component packaging on WindowsThe change from `\` to `/` in !5640 does not work on Windows. Use `cmake_path` to form a path to an image directory with preinstalled files.
Fixes: #22489
Backport: release
Topic-rename: cpack-nuget-components-on-windowsThe change from `\` to `/` in !5640 does not work on Windows. Use `cmake_path` to form a path to an image directory with preinstalled files.
Fixes: #22489
Backport: release
Topic-rename: cpack-nuget-components-on-windows3.23.2Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7236CPack/WIX: Add CPACK_WIX_ARCHITECTURE to support Windows for ARM installers2022-05-05T09:31:49-04:00Jakob LoverCPack/WIX: Add CPACK_WIX_ARCHITECTURE to support Windows for ARM installersBy default, the WIX generator automatically determines the architecture which CPack should create an installer for. This poses a problem if one wants to support Windows for ARM, where instead of x64, one wants to use the arm64 architectu...By default, the WIX generator automatically determines the architecture which CPack should create an installer for. This poses a problem if one wants to support Windows for ARM, where instead of x64, one wants to use the arm64 architecture.
Topic-rename: cpack-wix-arch3.24.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7227CPack/NSIS: Fix several typos in the NSIS template2022-09-25T15:07:06-04:00Sadie PowellCPack/NSIS: Fix several typos in the NSIS templateTopic-rename: cpack-nsis-typosTopic-rename: cpack-nsis-typos3.24.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7221CPack: Remove the deprecated PackageMaker generator2022-05-05T09:18:42-04:00Craig ScottCPack: Remove the deprecated PackageMaker generatorThis CPack generator has been deprecated since !4309.
Fixes: #23344This CPack generator has been deprecated since !4309.
Fixes: #233443.24.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7220productbuild: Restore CPACK_PACKAGEMAKER_CHOICES variable2022-05-03T11:24:15-04:00Craig Scottproductbuild: Restore CPACK_PACKAGEMAKER_CHOICES variableIn !7092, the variable holding the main contents
of the distribution.dist XML file was renamed from
CPACK_PACKAGEMAKER_CHOICES to CPACK_APPLE_PKG_INSTALLER_CONTENT.
This reflected the fact that the PackageMaker generator is deprecated.
T...In !7092, the variable holding the main contents
of the distribution.dist XML file was renamed from
CPACK_PACKAGEMAKER_CHOICES to CPACK_APPLE_PKG_INSTALLER_CONTENT.
This reflected the fact that the PackageMaker generator is deprecated.
The new variable also includes more details than the old one held.
Some projects were relying on the old variable name, so we need to still
set that to the same contents as it would have previously provided.
Neither of these variables were previously documented, but the older
variable was mentioned in enough semi-official places that it essentially
became semi-supported. Document both variables and highlight that the
older one is deprecated.
Fixes: #23467
Backport: release3.23.2Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7185CPack: Use cmCommandLineArgument instead of cmsys::CommandLineArguments2022-10-25T10:12:03-04:00Kyle EdwardsCPack: Use cmCommandLineArgument instead of cmsys::CommandLineArguments3.24.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7176CPack/DMG: Do not use CPACK_RESOURCE_FILE_LICENSE for SLA by default2022-04-20T11:38:18-04:00Brad KingCPack/DMG: Do not use CPACK_RESOURCE_FILE_LICENSE for SLA by defaultSince macOS 12.0 deprecated the tools needed to attach a SLA to a
`.dmg`, we should no longer do this by default. Add a policy to
change the default to off.
Fixes: #22978Since macOS 12.0 deprecated the tools needed to attach a SLA to a
`.dmg`, we should no longer do this by default. Add a policy to
change the default to off.
Fixes: #229783.24.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7116CPack/IFW: Add missing referenced source file validation2022-03-28T10:53:19-04:00Craig ScottCPack/IFW: Add missing referenced source file validationA few file names used as input were not being validated (some new for 3.23, some existing). I've prepared this as a separate change so it can be included in the 3.23.0 release, or it can be pushed back to a 3.23.1 patch release if you th...A few file names used as input were not being validated (some new for 3.23, some existing). I've prepared this as a separate change so it can be included in the 3.23.0 release, or it can be pushed back to a 3.23.1 patch release if you think it's too deep into the current release cycle to put in a code change like this one.
Backport: release3.23.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7114CPack/IFW: Add support for QtIFW 4.32022-03-28T10:53:08-04:00Craig ScottCPack/IFW: Add support for QtIFW 4.3QtIFW 4.3 was released in February 2022. This adds that as a versioned directory to look for when searching for the QtIFW tools.
I've created this as a standalone change. It could be back ported to the 3.22 release as well, since it is ...QtIFW 4.3 was released in February 2022. This adds that as a versioned directory to look for when searching for the QtIFW tools.
I've created this as a standalone change. It could be back ported to the 3.22 release as well, since it is an environmental change.
Backport: release3.23.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7096CPack/NSIS: Fix uninstall command when run from installer2022-10-10T10:36:31-04:00Marc JeanmouginCPack/NSIS: Fix uninstall command when run from installerThe quoting of path introduced in !6517 created two errors in the uninstaller call: double quoting of the uninstaller executable, and quotes added to the `_?=` argument which does not support them. This fix simplifies the command
This f...The quoting of path introduced in !6517 created two errors in the uninstaller call: double quoting of the uninstaller executable, and quotes added to the `_?=` argument which does not support them. This fix simplifies the command
This fix *slightly* changes the behavior, in the sense that the uninstaller will now copy itself to the temporary directory when run, to greatly simplify the NSIS code here, which I don't think has any significant negative effect. Another fix keeping the `_?=` would have added a char to the existing `StrLen` command (to get rid of the ending quote) and adding a start offset of 1 to the `StrCpy` to get rid of the leading quote.
Backport: release
Topic-rename: cpack-nsis-fix-uninstall-quoting3.23.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7092productbuild: Don't write rootVolumeOnly attribute if writing domains2022-04-29T08:22:20-04:00Craig Scottproductbuild: Don't write rootVolumeOnly attribute if writing domainsThe `rootVolumeOnly` attribute is deprecated. Apple docs say to use domains instead, so don't output the `rootVolumeOnly` attribute when domains are enabled.
This MR includes a couple of minor cleanups in the code related to the main ch...The `rootVolumeOnly` attribute is deprecated. Apple docs say to use domains instead, so don't output the `rootVolumeOnly` attribute when domains are enabled.
This MR includes a couple of minor cleanups in the code related to the main change.
Fixes: #23343
Backport: release3.23.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7003CPack: Add parallel zstd compression2022-02-24T12:57:35-05:00Russell GreeneCPack: Add parallel zstd compressionTopic-rename: cpack-zstd-parallelTopic-rename: cpack-zstd-parallel3.24.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/6963CPack/RPM: Honor CPACK_RPM_<component>_PACKAGE_ variables when set OFF2022-02-15T09:54:59-05:00Philip BaileyCPack/RPM: Honor CPACK_RPM_<component>_PACKAGE_ variables when set OFFFixes: #23182
Topic-rename: cpack-rpm-component-var-offFixes: #23182
Topic-rename: cpack-rpm-component-var-off3.24.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/6920CPack/NSIS: Fix description not displayed for components2022-02-01T10:30:58-05:00Johnny JazeixCPack/NSIS: Fix description not displayed for componentsFixes: #23151
Topic-rename: cpack_nsis_no_descriptionFixes: #23151
Topic-rename: cpack_nsis_no_description3.23.0Brad KingBrad King