Allow installing targets defined in a different directory scope
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
If you try to INSTALL TARGET a target that was defined in a different directory, CMake fails with an error.
This is behaviour is really annoying. We are trying to install only libraries that get used by executables that need to be installed. However, if the library and executable are defined in different directories, this bug prevents you from INSTALLing the library at the place where you know you need to install it. Using INSTALL FILES partially works, but causes stripping and rpath changing to break, as CMake no longer recognizes the library as a library.
If this behaviour is a feature, it would be really nice to have documentation of why it is a feature. (I can't seem to be able to define targets with the same name in different directories, so why on earth would INSTALL TARGETS be the only command that only considers