<br><br><div class="gmail_quote">On Fri, Jan 30, 2009 at 7:11 AM, Philip Lowman <span dir="ltr"><<a href="mailto:philip@yhbt.com">philip@yhbt.com</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;">
<div class="gmail_quote"><div class="Ih2E3d">On Fri, Jan 30, 2009 at 12:08 AM, Tyler Roscoe <span dir="ltr"><<a href="mailto:tyler@cryptio.net" target="_blank">tyler@cryptio.net</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;">
I'll spend some more time reading FindQt4.cmake at work tomorrow, but I<br>
wanted to post this while I'm thinking about it.<br>
<br>
I would like to tell find_package where my third-party libraries are (Qt<br>
specifically). Since I know where the libraries are, I could manually<br>
add paths to INCLUDE_DIRS and LINK_LIBRARIES, but FindQt4 already knows<br>
how to do all of that so why duplicate the effort?<br>
<br>
This is for an internal build system, so I want to use a specific<br>
version of Qt installed on a networked filesystem to prevent any<br>
weirdness caused by a developer compiling against some random Qt that<br>
she might have on her dev machine.<br>
<br>
This seems like a common situation, so surely there's a CMake way to<br>
handle it? I was hoping the PATHS parameter would do what I want but<br>
it's for specifying the path to the FindXXX modules.</blockquote></div><div><br>Read the documentation for the find_path() and find_library() commands. Setting the variable CMAKE_PREFIX_PATH (or environment variable) will likely be of tremendous help to you.<br>
</div></div></blockquote><div><br>I have a project with similar requirements as Tyler's, and we effectively use the CMAKE_PREFIX_PATH variable. The thing is that if you ONLY want the FindXXX.cmake to look in the paths pointed by CMAKE_PREFIX_PATH, and not the standard ones (e.g., /usr, /usr/local, ... on Unix), this might not be enough.<br>
FindBoost.cmake has a very convenient variable named Boost_ROOT that specifies where the boost libraries are located. Taking a quick look at the FindQt*.cmake doc, I didn't find a similar functionality, but I still wonder if it can be achieved in a simple way.<br>
<br><br>A side-comment that is tangentially related to the subject: all of our custom-made FindXXX.cmake files use the HINTS property of find_path(...) and find_library(...) (CMake >= 2.6).<br><br>HTH,<br><br>Adolfo Rodríguez Tsouroukdissian<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>-- <br><font color="#888888">Philip Lowman<br>
</font><br>_______________________________________________<br>
CMake mailing list<br>
<a href="mailto:CMake@cmake.org">CMake@cmake.org</a><br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br>