broadinstitute/gamgee — pull request #352 by nsubtil (2014-11-04 03:15:04+00:00)
Title: CMake fixes for Firepony

A few fixes that make it easier to build Gamgee as an external dependency.

The major change is a new install target, which installs Gamgee (and optionally it's dependencies) to the CMake install prefix. This is useful to allow dependent projects to locate Gamgee headers and binaries.

The major caveat is that Gamgee currently depends on Broad's version of htslib, while it seems most Linux systems package Sanger's version instead. Because they use the same file names for libraries and headers, there's a chance the install target could overwrite the system installed version of htslib, potentially causing trouble for users. However, unless we allow installing dependencies, we end up having to either build htslib twice or else having a "parent" project dig out htslib directly from the Gamgee build directory, neither of which is a good solution.

The INSTALL_DEPENDENCIES option was added to make this easier. When set, CMake will generate install targets for htslib. This is off by default to try to avoid causing trouble with any system-installed versions and is really only meant to be used by dependent projects (which would override the install prefix to their own build directory).

I would consider renaming Broad's version of htslib to avoid naming conflicts with the one from Sanger.