[CMake] find_path for multiple files
Michael Wild
themiwi at gmail.com
Wed Mar 3 08:25:47 EST 2010
On 3. Mar, 2010, at 11:33 , Guillaume Duhamel wrote:
> Hi,
>
> I'm working on a new FindXXX module and I need to search for paths
> providing multiple header files, for instance path P1 could provide
> A.h and B.h while not providing C.h when path P2 provides the three of them.
> In this case, I want to detect P2 only.
>
> Does CMake has some built-in functions or module to achieve that or do I
> need to implement it myself?
>
> Guillaume
Is the mapping unique? I.e. if you find C.h, is it sure that the same directory also contains A.h and B.h? Then it's just a matter of ordering the find_path calls and providing HINTS based on the previous invocations. Also, if C.h is only optional, you might consider to just let the user deal with the whole thing...
If not, it's going to be difficult to achieve what you want because there is no "find_path_next"...
More information about the CMake
mailing list