[Cmake] external packages

Miller, James V (CRD) millerjv at crd.ge.com
Thu May 3 12:44:04 EDT 2001


You can use the FIND_INCLUDE and FIND_LIBRARY commands in CMakeLists.txt which allow you to specify a
series of locations to search for external packages.  If the packages cannot be found, the associated
variables appear as NOTFOUND in the CMake cache file.  The user could then edit this file to specify
where they keep these packages.

Here is an example for using FLTK as an external package.  The syntax may have changed in the last
week or so....

FIND_INCLUDE( FLTK_INCLUDE_DIR    FL/Fl.H     H:/usr/local/fltk /usr/local/fltk /usr/local/include )
FIND_LIBRARY( FLTK_LIBRARY_DIR    fltk.lib    H:/usr/local/fltk/lib /usr/local/fltk/lib
/usr/local/lib )

INCLUDE_DIRECTORIES(
${FLTK_INCLUDE_DIR}
)

LINK_DIRECTORIES(
${FLTK_LIBRARY_DIR}
)

LINK_LIBRARIES (
fltk
)


-----Original Message-----
From: Cross, Geoff (CRD) 
Sent: Thursday, May 03, 2001 12:33 PM
To: 'cmake at public.kitware.com'
Subject: [Cmake] external packages




What are the currently feelings on external packages under unix, and how to set the
INCLUDE_DIRECTORIES and LINK_LIBRARIES?  Ideally, I want to do as little in the configure script as
possible, so I was wondering whether it might be an idea to have the installer edit some file in the
source root that would look something like

MESA=/some/path
GTK=
HAS_NETLIB= 0
   .
   .
   .

Therefore, instead of 

./configure --mesa-path=/some/path --without-gtk --with-netlib ...

the installer would just edit this file, and type

./configure



Geoff.

_______________________________________________
Cmake mailing list
Cmake at public.kitware.com
http://public.kitware.com/mailman/listinfo/cmake




More information about the CMake mailing list