install: Allow absolute EXPORT destination with relative targets (#15258)

When install(EXPORT) is given an absolute destination we cannot compute
the install prefix relative to the installed export file location.
Previously we disallowed installation of targets in such exports with a
relative destination, but did not enforce this for target property
values besides the location of the main target file.  This could lead to
broken installations when the EXPORT is installed to an absolute path
but usage requirements are specified relative to the install prefix.

Since an EXPORT installed to an absolute destination cannot be relocated
we can just hard-code the value of CMAKE_INSTALL_PREFIX as the base for
relative paths.  This will allow absolute install(EXPORT) destinations
to work with relative destinations for targets and usage requirements.

Extend the ExportImport test with a case covering this behavior.
Add 'ANDROID_API_MIN' target property to set Android Target MIN API

Also add a 'CMAKE_ANDROID_API_MIN' variable to set the property
default.  Teach the VS generator to write the MIN API value into
Nsight Tegra project files.
cmTarget: Use GetCFBundleDirectory within GetFullNameInternal

Replace duplicated code by call to GetCFBundleDirectory.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
Xcode: Call IsCFBundleOnApple to decide if bundle is being built

Narrow down the decision if a CFBundle is built to one place.
This is a preparation patch to add another target property
which, if set, will imply BUNDLE.  Having only one function
which will have to look at both properties helps to keep code
clean.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
sha2: Fix -Wcast-qual warnings by adding const to some casts
KWSys 2014-12-16 (cc4046a8)

Extract upstream KWSys using the following shell commands.

$ git archive --prefix=upstream-kwsys/ cc4046a8 | tar x
$ git shortlog --no-merges --abbrev=8 --format='%h %s' dec9c30b..cc4046a8
Brad King (2):
      9c3eacf8 Add CONTRIBUTING.rst file with instructions to contribute
      cc4046a8 Directory: Work around PGI problem with Linux Large File Support

Jean-Christophe Fillion-Robin (2):
      c38ba638 SystemInformation: Improve Get(Available/Total)VirtualMemory for windows
      58308145 SystemInformation: Improve comments in private implementation

Change-Id: Ic033444a9c03a8a8b5195e7dac108af2aec79fa6
Merge branch 'upstream-kwsys' into update-kwsys
Help: Add INTERFACE_LIBRARY to TYPE target property documentation
curl: Use OS X SSL/TLS native implementation

On OS X, when CMAKE_USE_OPENSSL is OFF, use the OS implementation.
This will allow the OS-configured CA list to be trusted automatically.

This is supported on OS X 10.6 and above using AppleClang, Clang, and
GNU compilers.
Tests: Move CTestTestMemcheck cases into a RunCMake.CTestMemcheck test

The CTestTestMemcheck test cases all try to check the ctest output with
a regular expression.  They fail intermittently due to ordering of the
portions of the output that come from stdout and stderr being mixed.
Convert all the test cases to use the RunCMake infrastructure to match
stdout and stderr separately.
Tests: Move CTestTestMemcheck tools into Tests/CMakeLib

The dummy memcheck tools we build for the RunCMake.CTestMemcheck tests
require CMakeLib, so put them in a Tests/CMakeLib/PseudoMemcheck
directory.
Merge topic 'curl-darwinssl'

e4563257 curl: Use OS X SSL/TLS native implementation
Merge topic 'test-memcheck-with-RunCMake'

7ca6bdf0 Tests: Move CTestTestMemcheck tools into Tests/CMakeLib
1651dc96 Tests: Move CTestTestMemcheck cases into a RunCMake.CTestMemcheck test
Merge topic 'doc-INTERFACE-target-type'

473446ab Help: Add INTERFACE_LIBRARY to TYPE target property documentation
Merge topic 'fix-sha2-cast-constness'

d4d2d72f sha2: Fix -Wcast-qual warnings by adding const to some casts
Merge topic 'vs-nsight-tegra-min-api'

eeaa25e5 Add 'ANDROID_API_MIN' target property to set Android Target MIN API
Merge topic 'update-kwsys'

3470704f Merge branch 'upstream-kwsys' into update-kwsys
6a5ab894 KWSys 2014-12-16 (cc4046a8)
KWSys 2014-12-18 (87c65319)

Extract upstream KWSys using the following shell commands.

$ git archive --prefix=upstream-kwsys/ 87c65319 | tar x
$ git shortlog --no-merges --abbrev=8 --format='%h %s' cc4046a8..87c65319
Sean McBride (1):
      87c65319 SharedForward: Suppress clang -Wcast-qual warnings with conditional pragma

Change-Id: I2f79780385aca7e0caa24e5bb0c0b4106b786c37
Merge branch 'upstream-kwsys' into update-kwsys
bootstrap: Fix syntax for Solaris 10 shell (#15317)

In commit v3.1.0-rc2~7^2 (Workaround for short jump tables on PA-RISC,
2014-11-04) we added use of shell syntax not supported on the Solaris
shell.  Avoid using the '!' operator.

Reported-by: Friedrich Haubensak <hsk@imb-jena.de>