<div dir="ltr"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"></span><div class="gmail_extra"><div class="gmail_quote"><div>Hi George, Jakub,<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="blue" vlink="purple" lang="DE-CH"><div><div><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">  NO_DEFAULT_PATH</span>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">  NO_CMAKE_ENVIRONMENT_PATH<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">  NO_CMAKE_PATH<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">  NO_SYSTEM_ENVIRONMENT_PATH<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">  NO_CMAKE_SYSTEM_PATH</span></p></div></div></div></blockquote><div><br></div><div>The options specified are redundant.  NO_DEFAULT_PATH implies the later 4.  If you just specify NO_DEFAULT_PATH then only HINTS and user guess paths (those specified by the PATH argument) will be checked.<br></div><div><br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="blue" vlink="purple" lang="DE-CH"><div><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">  NO_CMAKE_FIND_ROOT_PATH</span></p></div></div></div></blockquote><div><br></div><div>This is specific to cross compiling, and usually isn't needed unless that's your situation.<br></div><br></div>A particularly effective and commonly used pattern is to build up the options to the find call in a variable.  The FindBoost module does this very thing to restrict it's component search to all the same directory.  The idea is that if you have a specific location that you know your file should be found in when set, then something like this could work:<br><span style="font-family:courier new,monospace"><br></span></div><div class="gmail_extra"><span style="font-family:courier new,monospace">set(FOO_FIND_OPTS)<br></span></div><div class="gmail_extra"><span style="font-family:courier new,monospace">if(FOO_DIR)<br></span></div><div class="gmail_extra"><span style="font-family:courier new,monospace">  set(FOO_FIND_OPTS HINTS "${FOO_DIR}" NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)<br></span></div><div class="gmail_extra"><span style="font-family:courier new,monospace">endif()<br></span></div><div class="gmail_extra"><span style="font-family:courier new,monospace">find_library(FOO_LIBRARY MyFooLib ${FOO_FIND_OPTS})</span><br><br></div><div class="gmail_extra">This way, if FOO_DIR is set, then it will only look there.  However, if it's not, then FOO_FIND_OPTS is empty and the standard search will happen.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">- Chuck<br></div></div>