On Tue, Feb 26, 2008 at 1:28 PM, David Cole &lt;<a href="mailto:david.cole@kitware.com">david.cole@kitware.com</a>&gt; wrote:<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;">
Actually, try this: (note the &quot;NAMES&quot;)<br>
find_library(glut NAMES &quot;glut32&quot; PATHS &quot;Z:/Opt/lib&quot; NO_DEFAULT_PATH)<br>
<br>
Commands can be upper or lower case, but the arguments to the commands
that are &quot;special&quot; words must typically still be upper case, exactly as
documented with --help-command. So NAMES should be all upper case...</blockquote><div><br>Harsha,<br><br>Writing your own custom FIND_LIBRARY() invocations works, but take note of the existence of CMAKE_LIBRARY_PATH and CMAKE_INCLUDE_PATH which are great variables to use if you&#39;re trying to force linking against a library installed in a non-standard place.&nbsp; This way you can reuse existing CMake Find* Modules.&nbsp; For example:<br>
<br><br>SET(CMAKE_LIBRARY_PATH &quot;Z:/Opt/lib&quot;)<br>SET(CMAKE_INCLUDE_PATH &quot;Z:/Opt/include&quot;)<br>FIND_PACKAGE(GLUT)<br>SET(CMAKE_LIBRARY_PATH)&nbsp; # Clear the contents of the variable for safety<br>SET(CMAKE_INCLUDE_PATH)&nbsp; # Clear the contents of the variable for safety<br>
<br><br><br>If you&#39;re using CMake CVS you can append to the CMAKE_PREFIX_PATH variable instead (provided the header files are in &quot;include&quot; and the libraries in &quot;lib&quot; relative to one of the directories specified in the list)<br>
<br>For example, if your libraries were located like so:<br>/Path/To/CustomGlut/lib/libglut.so<br>/Path/To/CustomGlut/include/GL/glut.h<br><br>SET(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} &quot;/Path/To/CustomGlut&quot;)<br>
FIND_PACKAGE(GLUT)<br><br><br></div></div>-- <br>Philip Lowman