Take in account CPACK_INSTALL_SCRIPT when running `cpack`
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
According lines 226-258 of the Source/CPack/cmCPackGenerator.cxx
file, there are few ways to preinstall files to be packed:
- via
CPACK_INSTALL_COMMANDS
variable [InstallProjectViaInstallCommands() function] -
CPACK_INSTALL_SCRIPT
[InstallProjectViaInstallScript()] -
CPACK_INSTALLED_DIRECTORIES
[InstallProjectViaInstalledDirectories()] - and finally
CPACK_INSTALL_CMAKE_PROJECTS
[InstallProjectViaInstallCMakeProjects()]
but Source/CPack/cpack.cxx
at line 470 checks only 1,3,4 options! so if my configuration file has only CPACK_INSTALL_SCRIPT
variable defined, it doesn't want to run w/ the error:
.../Source/CPack/cpack.cxx:479 Please specify build tree of the project that uses CMake using CPACK_INSTALL_CMAKE_PROJECTS, specify CPACK_INSTALL_COMMANDS, or specify CPACK_INSTALLED_DIRECTORIES.
Edited by Ben Boeckel