cpfind links against system flann, but includes the bundled flann
During the build process, a system installed flann is detected fine, but the include lines for cpfind have these entries in this order:
The result is that although cpfind dynamically links to the system flann library, cpfind is actually compiled using the bundled flann headers. This fails on fedora f17, because it has flann-1.7.1, whereas Hugin HG tip bundles flann-1.6.1 headers.
I tried fixing this by rearranging lines in CMakeLists.txt, but it doesn't seem to control the order of -I entries, so I don't know enough cmake magic.
For the fedora package simply removing the src/foreign/flann folder lets me build ok, but this isn't a solution for most users.