<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
Actually I run into this ALL the time (tiff, expat, hdf5) and I have most of mine stored in "non-Standard" locations. I end up copying the the FindXXX.cmake into my local project directory and then adding some code like the following:<div><br class="webkit-block-placeholder"></div><div><div>SET(EXPAT_INCLUDE_SEARCH_DIRS</div><div>  $ENV{EXPAT_INSTALL}/include/expat</div><div>)</div><div><br class="webkit-block-placeholder"></div><div>SET (EXPAT_LIB_SEARCH_DIRS</div><div>  $ENV{EXPAT_INSTALL}/lib</div><div>  )</div><div><br class="webkit-block-placeholder"></div><div>FIND_PATH(EXPAT_INCLUDE_DIR </div><div>  NAMES expat.h</div><div>  PATHS ${EXPAT_INCLUDE_SEARCH_DIRS} </div><div>  NO_DEFAULT_PATH</div><div>  )</div><div><br class="webkit-block-placeholder"></div><div>The important part is that I am looking for an environment variable to help find the paths/libraries. This type of thing could be added the the FindXXX.cmake files so if someone has their libs installed in non-standard locations they can set an env variable and let cmake find the package that way.</div><div><br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div>Also.. Why would I "hard-code" paths into a "cross-platform" build system.. that is just asking for trouble. If Stephen has one of his associates build his source for him then that associates computer must be laid out the EXACT same way which is not going to happed.</div><div><br class="webkit-block-placeholder"></div><div> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Bitstream Vera Sans; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">-- </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Mike Jackson   Senior Research Engineer</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Innovative Management &amp; Technology Services</div><br class="Apple-interchange-newline"></span> </div><br><div><div>On Nov 19, 2007, at 1:34 PM, David Cole wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">What is wrong with explicitly specifying the non-standard locations up front so that FIND_PACKAGE has nothing to do?<div><br class="webkit-block-placeholder"></div><div>In other words, prime all the relevant cache variables with the non-standard locations. </div><div><br class="webkit-block-placeholder"></div><div>There are many Find* scripts in the CMake Modules directory. I think it would be difficult to make a blanket recommendation concerning all of them that would be true 100% of the time with FIND_PACKAGE. <br><br> </div><div>Are there specific packages you are having difficulty with?</div><div><br class="webkit-block-placeholder"></div><div><br><div><span class="gmail_quote">On 11/19/07, <b class="gmail_sendername">Stephen Collyer </b> &lt;<a href="mailto:scollyer@netspinner.co.uk">scollyer@netspinner.co.uk</a>&gt; wrote:</span><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">This would seem to be a very frequently asked question <br>but I can't find it anywhere in the wiki or FAQ:<br>how do I tell FIND_PACKAGE to search on additional paths<br>to the default set, so I can work with packages installed<br>in non-standard locations ?<br><br>--<br> Regards<br><br>Steve Collyer<br>Netspinner Ltd<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"> http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br> </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">CMake mailing list</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="mailto:CMake@cmake.org">CMake@cmake.org</a></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a></div> </blockquote></div><br></div></body></html>