[CMake] CMake Tutorial and Error: undefined symbols
Eric Noulard
eric.noulard at gmail.com
Sun Jan 28 14:27:05 EST 2007
2007/1/28, David Morris <dvmorris at gmail.com>:
>
>
> Thanks I will try that.
>
> I have one other question that I have yet to find on the wiki or any other
> site. What is the difference between a package and a library?
>
> I'm trying to find FLTK as a package and it doesn't work,
FIND_PACKAGE does work iff there exist
a Find<PackageName>.cmake file in the cmake include path.
A set "package" finding files are provided with CMake distribution
on my LInux box there are in:
/usr/share/cmake-2.4/Modules/Find<PackageName>.cmake
> but this code
> seems to work:
>
> FIND_LIBRARY(FLTK_LIBRARY
> NAMES fltk fltk-1.1
> PATHS /usr/lib /opt/local/lib
> )
FIND_LIBRARY is a CMake builtin macro
(which may be used in the Find<PackageName>.cmake files)
cmake --help-command FIND_LIBRARY
will give you valuable informations about its usage.
>
> Can I use the same IF(FLTK_FOUND) kind of syntax after a FIND_LIBRARY call?
No in this case you have to check
IF (FLTK_LIBRARY)
or the converse
IF (FLTK_LIBRARY-NOTFOUND)
depending on the logic you want.
--
Erk
More information about the CMake
mailing list