This is a bit odd to me. Why would not everything be required?<br>Are there situations in which you might not need a package?<br><br>Maybe I can answer my own question...<br><br>If you have 2 libraries A and B that do the same task maybe you can <br>
use different compile rules like you showed below, while if A is the only<br>one, then &quot;REQUIRED&quot; gives the trick.<br><br>--<br>Andrea Tagliasacchi<br><br><br><div class="gmail_quote"><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>You might want to consider adding the REQUIRED keyword to the find_package() command if the package is absolutely essential to compiling your entire project.  It should yield a far more useful error message if the package is not found.<br>

If you don&#39;t declare a package REQUIRED, a good rule of thumb is to use conditionals keyed on the CMake module&#39;s found variable (e.g OPENGL_FOUND ) to control where you use it.<br><b>find_package(Foo)<br>if(FOO_FOUND)<br>

   include_directories(${FOO_INCLUDE_DIR})<br>endif()<br></b></div></div>-- <br><font color="#888888">Philip Lowman<br>
</font></blockquote></div><br>