Robin,
- The CMake install does no longer recreate some of the
top-level directories when they already exist. That makes it
possible to now symlink them somewhere else after the first
install.
The new code probably isn't doing as you intended. The OPTIONAL flag seems unrelated to the existence of the destination directory, it's checking the existence of the named directory as a source directory (part of the build) and won't complain if it doesn't exist, but it also won't create the destination directory in that case, which is a problem. In other words, for a fresh install, the spool and logs directories don't get created for me.
I would re-code it to script the creation of those directories at `make install` time, but I'm finding that CPack will only bundle things up into the binary package if they've been installed w/ the install() macro and that's not callable at `make install` time.
So my idea is that I'll re-code for the general case to script the directory creation at `make install` time, but also add a configure option that a packager can set to explicitly use the install() macro instead.
Are you able to give the platform and CMake version that produced the bad behavior of the installation of directories overwriting/recreating existing ones? I don't see the same problem (using the original code) on OS X 10.6 + CMake 2.8.3, so I'd like to document it.