CMake: Prepare dedicated license file for our own CPack configuration

The CPack WIX Generator requires a `.txt` file extension.
Provide that regardless of the actual license file extension.
This commit is contained in:
Brad King 2025-03-02 21:06:47 -05:00
parent 759cd843db
commit a9190bd38d

View File

@ -14,7 +14,9 @@ if(CMake_INSTALL_DEPENDENCIES)
include(${CMake_SOURCE_DIR}/Modules/InstallRequiredSystemLibraries.cmake)
endif()
set(CPACK_RESOURCE_FILE_LICENSE "${CMake_LICENSE_FILE}")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/LICENSE.txt")
configure_file("${CMake_LICENSE_FILE}" "${CPACK_RESOURCE_FILE_LICENSE}" COPYONLY)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CMake is a build tool")
set(CPACK_PACKAGE_VENDOR "Kitware")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CPACK_RESOURCE_FILE_LICENSE}")