[CMake] including lib

David Cole david.cole at kitware.com
Tue Feb 26 13:28:23 EST 2008


Actually, try this: (note the "NAMES")
find_library(glut NAMES "glut32" PATHS "Z:/Opt/lib" NO_DEFAULT_PATH)

Commands can be upper or lower case, but the arguments to the commands that
are "special" words must typically still be upper case, exactly as
documented with --help-command. So NAMES should be all upper case...


HTH,
David



On 2/26/08, Mike Jackson <imikejackson at gmail.com> wrote:
>
> find_library(glut name "glut32" PATHS "Z:/Opt/lib" NO_DEFAULT_PATH)
>
> --
>
> Mike Jackson   Senior Research Engineer
> Innovative Management & Technology Services
>
>
>
> On Feb 26, 2008, at 1:12 PM, Harsha Sri-Narayana wrote:
>
> > I'm having a bit of trouble linking to a library.  I have a library
> > in a non standard place so I don't think I can use the
> > findglut.cmake helper script.  I have this so far:
> >
> > .
> > .
> > find_library(glut name "glut32.lib" PATHS "Z:/Opt/lib"
> > NO_DEFAULT_PATH)
> > .
> > .
> > .
> > target_link_libraries(mytarget ${glut})
> >
> >
> > I get:
> > "CMake Error: This project requires some variables to be set and
> > cmake can not find them.  Please set glut."
> >
> > Any help would be greatly appreciated,
> > -Harsha
> > _______________________________________________
> > CMake mailing list
> > CMake at cmake.org
> > http://www.cmake.org/mailman/listinfo/cmake
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20080226/4f4ab525/attachment.html


More information about the CMake mailing list