[CMake] Getting a FindXXX.cmake script to revert to using XXX_DIR on failure
Mike Arthur
mike at mikearthur.co.uk
Mon Jun 23 06:28:48 EDT 2008
On Friday 20 June 2008 21:10:45 Stefán Freyr Stefánsson wrote:
> Is there any way for me to have CMake revert to the YARP_DIR method if the
> FindYARP.cmake script is unsuccessful?
What I do, for CLucene, is the following:
if (NOT CLUCENE_LIBRARY)
add_subdirectory(CLucene)
set(CLUCENE_LIBRARY clucene-core)
endif (NOT CLUCENE_LIBRARY)
So this adds the CLucene subdirectory and pulls in the clucene-core target as
a dependency whenever I reference CLUCENE_LIBRARY. I should probably do the
same with includes...
--
Cheers,
Mike Arthur
More information about the CMake
mailing list