Commit Graph

25 Commits

Author SHA1 Message Date
Eric NOULARD 4986d525af Use CPACK_xxx and CMAKE_xxx in a consistent way.
CMAKE_xxx vars are now used in the CMake-generated cmake_install.cmake
script while CPACK_xxx equivalent vars are used from within CPack.
CPack is responsible for getting/forwarding definitions of
CPACK_xxxx var corresponding to CMAKE_xxxx when invoking
CMake-generated install scripts.
As a consequence:
CMAKE_ABSOLUTE_DESTINATION_FILES
CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION
CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION
may be used from outside CPack as well.
e.g.
cmake -DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=1 -P cmake_install.cmake
works as expected.
2012-05-20 17:28:54 +02:00
Eric NOULARD f90223cafc Fix KWStyle warning 2012-05-15 07:54:42 +02:00
Eric NOULARD 47f0dbd70b CPack add necessary check to detect/warns/error on ABSOLUTE DESTINATION
The [usually] wrong usage of absolute DESTINATION in INSTALL rules
keeps popping-up on the ML. We shall have some way to:
  1) easily detect it.
  2) forbids this for some CPack generator like NSIS
In fact it should certainly be forbidden for *any* generators
when used on Windows but we may implements that on top of the current
patch.
The patch ask the task to the generated cmake_install.cmake scripts.
Those scripts are a little bit more complicated with that but
iff there are absolute DESTINATION. This cost nothing if relative
DESTINATION are used.
Two new vars are introduced (and documented to handle that):
CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION
and
CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION
2012-05-14 23:29:42 +02:00
Brad King 573fa3bf13 Factor cmInstallType out of cmTarget::TargetType
The purpose of the TargetType enumeration was overloaded for install
type because install rules were once recorded as targets.  Factor the
install types out into their own enumeration.
2012-02-27 13:19:57 -05:00
Eric NOULARD 225abc555d InstallGen/CPack fix handling absolute installed file regression 2010-09-20 23:33:35 +02:00
Eric NOULARD 6a521f8604 CPack Enable better handling of absolute installed files
The idea of the patch is to let the install generator define
CPACK_ABSOLUTE_INSTALL_FILES then when CMake is installing
project he will concatenate the list of files and give
it to specific CPack Generator by defining CPACK_ABSOLUTE_INSTALL_FILES
to be the list of ALL files that were installed using absolute destination.
An example of use has been applied to RPM generator which now
tries to automatically build a relocatable package.
2010-08-23 17:38:33 +02:00
Brad King 96afb12087 Convert CMake to OSI-approved BSD License
This converts the CMake license to a pure 3-clause OSI-approved BSD
License.  We drop the previous license clause requiring modified
versions to be plainly marked.  We also update the CMake copyright to
cover the full development time range.
2009-09-28 11:43:28 -04:00
Brad King da993b64ce ENH: Remove unused PROPERTIES from file(INSTALL)
The undocumented file(INSTALL) command used to support a PROPERTIES
option, but no install code still uses it.  This removes the option.
2009-04-27 13:20:57 -04:00
Brad King e67f5138b8 ENH: Refactor cmInstallGenerator for re-use
A new cmScriptGenerator base class factors out the non-install-specific
part of cmInstallGenerator.  This will be useful for other generators
that want per-configuration functionality.
2009-03-16 10:39:56 -04:00
Brad King b14abe31a9 BUG: Fix component-name test on installation
Generated cmake_install.cmake script code used MATCHES to compare
component names.  This does not support characters considered special by
regular expression syntax in component names.  This change uses STREQUAL
instead.  See issue #8256.
2008-12-16 09:20:51 -05:00
Brad King 5594ad4885 ENH: Updated exporting and importing of targets to support libraries and configurations.
- Created cmExportFileGenerator hierarchy to implement export file generation
  - Installed exports use per-config import files loaded by a central one.
  - Include soname of shared libraries in import information
  - Renamed PREFIX to NAMESPACE in INSTALL(EXPORT) and EXPORT() commands
  - Move addition of CMAKE_INSTALL_PREFIX to destinations to install generators
  - Import files compute the installation prefix relative to their location when loaded
  - Add mapping of importer configurations to importee configurations
  - Rename IMPORT targets to IMPORTED targets to distinguish from windows import libraries
  - Scope IMPORTED targets within directories to isolate them
  - Place all properties created by import files in the IMPORTED namespace
  - Document INSTALL(EXPORT) and EXPORT() commands.
  - Document IMPORTED signature of add_executable and add_library
  - Enable finding of imported targets in cmComputeLinkDepends
2008-01-28 08:38:36 -05:00
Alexander Neundorf 7db8c86ac9 STYLE: add some newlines to cmake_install.cmake, so it's easier to read
-move the array behind the if, it's unused before it

Alex
2007-08-20 16:59:06 -04:00
Brad King 7f29f8966d ENH: Further cleanup of installation script generation. The per-component and per-configuration testing is now done in cmake code instead of in the FILE(INSTALL) command. The generation of the cmake code to do these tests is centralized in cmInstallGenerator. Old-style shared library versioning and component/config support code has been removed from FILE(INSTALL). This commit is surrounded by the tags CMake-InstallGeneratorCleanup2-pre and CMake-InstallGeneratorCleanup2-post. 2007-07-02 14:56:57 -04:00
Brad King c83ae4673d ENH: Improved indentation of generated cmake_install.cmake code. 2007-07-02 11:02:52 -04:00
Brad King fdf7b203af ENH: First step of install script generator cleanup. Each configuration to be installed is now separately handled instead of using variables to store per-configuration names. For targets the component and configuration install-time tests are now done in the install script instead of in the FILE(INSTALL) command. This cleans things up like not trying to strip a file that was optionally not installed. It also simplifies the code for install_name adjustment on OSX. This commit is surrounded by the tags CMake-InstallGeneratorCleanup1-pre and CMake-InstallGeneratorCleanup1-post. 2007-06-28 16:11:18 -04:00
Brad King bed79f6c6b ENH: Implemented INSTALL(DIRECTORY) command and added a test. Re-organized cmFileCommand's implementation of FILE(INSTALL) a bit to help out. This addresses bug#1694 and partially addresses bug#2691. 2006-08-21 16:55:03 -04:00
Brad King 8a72d43c17 ENH: Started implementing INSTALL(DIRECTORY) command mode. This is not yet finished so it is undocumented and there is no test. These changes also separate the notions of file and directory permissions. 2006-08-17 14:48:54 -04:00
Ken Martin ba2b99bb9f STYLE: fix line length 2006-05-11 15:50:11 -04:00
Brad King 50a0f71120 ENH: Added CONFIGURATIONS option to INSTALL command to allow per-configuration install rules. 2006-05-05 14:57:19 -04:00
Brad King 08b14163ee ENH: Added named component installation implementation. Installation behavior should be unchanged unless -DCOMPONENT=<name> is specified when cmake_install.cmake is invoked. 2006-03-30 13:33:48 -05:00
Andy Cedilnik ed5f95cf23 ENH: Add proper support for installing bundles 2006-03-28 13:16:15 -05:00
Brad King a2e136fd17 ENH: Added PERMISSIONS and RENAME options to the INSTALL command's FILES and PROGRAMS mode, and corresponding support to FILE(INSTALL). Default permissions for shared libraries on non-Windows/non-OSX platforms no longer has the execute bit set. 2006-03-03 18:44:32 -05:00
Brad King 3ca9ef09b7 BUG: Fixed optional file install support for multi-configuration generators. 2006-02-19 19:29:30 -05:00
Brad King e14d591194 BUG: Do not report files as installed if they are optional and do not exist. 2006-02-19 16:12:29 -05:00
Brad King 96f0266228 ENH: Created new install script generation framework. The INSTALL command creates the generators which are later used by cmLocalGenerator to create the cmake_install.cmake files. A new target installation interface is provided by the INSTALL command which fixes several problems with the INSTALL_TARGETS command. See bug#2691. Bugs 1481 and 1695 are addressed by these changes. 2006-02-19 15:25:27 -05:00