Perhaps you could use file(GLOB_RECURSE).<br><br> file(GLOB_RECURSE variable [RELATIVE path] <br> [FOLLOW_SYMLINKS] [globbing expressions]...)<br><br>See manual for the "file" command.<br>
<br>James<br><br><div class="gmail_quote">On Thu, Sep 24, 2009 at 4:36 AM, Pablo Yanez Trujillo <span dir="ltr"><<a href="mailto:shaoran@sakuranohana.org">shaoran@sakuranohana.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi<br>
<br>
I've already read the online documentation but I don't find anything<br>
about it. I'm want to use 'find_path'. I only have the installation<br>
prefix of a project and I would want to search recursively in this<br>
directory. I've thought of something like that:<br>
<br>
set(ABC_INSTALL_PREFIX "" CACHE PATH "Install Prefix of abc project")<br>
<br>
find_path(ABC_PACKAGE_FILE abc-config.cmake PATHS ${ABC_INSTALL_PREFIX}<br>
NO_DEFAULT_PATH)<br>
<br>
if(NOT ${ABC_PACKAGE_FILE})<br>
message(FATAL_ERROR "Could not find abc-config.cmake. Set<br>
ABC_INSTALL_PREFIX properly.")<br>
endif()<br>
<br>
set(abc_DIR ${ABC_PACKAGE_FILE})<br>
find_package(abc)<br>
<br>
but this only works when the abc-config.cmake file is stored in<br>
${ABC_INSTALL_PREFIX}. This is not the case, hence I would want to<br>
search for it recursively in ${ABC_INSTALL_PREFIX}, but I don't know how<br>
to manage it.<br>
<br>
Is it actually posible to search recursively with find_path?<br>
<br>
Pablo<br>
<font color="#888888"><br>
--<br>
Pablo Yanez Trujillo<br>
OpenPGP Key: <a href="http://www.sakuranohana.org/gpg/shaoran.asc" target="_blank">http://www.sakuranohana.org/gpg/shaoran.asc</a><br>
<br>
</font><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br>