Use cache variable to set BUILD_SHARED_LIBS rather than ordinary variable.
Use cache variable to set BUILD_SHARED_LIBS rather than ordinary
variable.

Change from old logic (which forced static library build for
most Windows cases) to forced static library build only
for the combination of Windows and ninja generator.  This
is only a temporary measure to work around a ninja generator bug
on Windows for the combination of shared libraries and using
the same name kernel ("qhull" in this case) for an executable
and shared library.

Reorganize some of the CMake logic.

svn path=/trunk/; revision=12377

FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot