On 26. Jan, 2010, at 10:17 , Eric Noulard wrote: > 2010/1/26 Michael Wild <them...@gmail.com>: >>> >>> Michael is right and I should have tell you that too, >>> May be installing your FindXXX.cmake is not the good way to go at all. >>> >>> see reference on XXXXConfig.cmake there >>> http://www.cmake.org/pipermail/cmake/2010-January/034778.html >> >> It is not necessarily wrong, if e.g. the XXXConfig.cmake file must find some >> other package to work. But then, you install that FindXXX.cmake file along >> with the XXXConfig.cmake and in the XXXConfig.cmake file temporarily expand >> the CMAKE_MODULE_PATH variable before calling find_package (or include() it >> directly after setting variables such as YYY_FIND_REQUIRED etc). > > I think the process (may be step by step explanation) on how to do > such thing is not that well documented :-) > I have no time (nor sufficient experience in this area) [yet] to do it > but would be glad to contribute > a started Wiki page on the subject. >
Agreed, it is not well documented. But then, it is also quite difficult to do so, because what goes into an XXXConfig.cmake file (only import targets, required variabls, or also do version checks, components, ...), whether to use a XXXUse.cmake file etc. varies widely from project to project. And then, if you also want to make this work from the build-directory, you have to got to even greater lengths by using export(TARGETS ...). If I find the time I probably will start a Wiki page which does the full-fledged thing, but also describes which parts to leave away if a certain feature is not desired/required. Michael _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake