[CMake] New FIND_* stuff checked into CVS

Filipe Sousa filipe at ipb.pt
Sat Mar 4 06:06:13 EST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bill Hoffman wrote:
> I have checked in a change to the way that the FIND_* commands work.
> It should be backwards compatible with the old commands, but allow for
> more control over search paths and how things are searched for.
> All 4 commands now use the same code to parse the arguments, so they are
> now consistent.  They can all disable the 4 external search paths used.
> Also, they have a PATH_SUFFIXES argument that allows for the specification of
> a directory name that can be added into all search paths.  For example, if
> you wanted to find a header like qt.h but this is always found in qt/qt.h,
> you could do this:
> 
> FIND_PATH(QT_INCLUDE NAMES qt.h PATH_SUFFIXES qt)
> 
> CMake will find it in /usr/local/include/qt/qt.h and set QT_INCLUDE
> to /usr/local/include.

fsousa at black ~/tmp/find/build $ ls -l /usr/local/include/qt/qt.h
- -rw-r--r--  1 root root 0 Mar  4 11:00 /usr/local/include/qt/qt.h

FIND_PATH(QT_INCLUDE NAMES qt.h PATH_SUFFIXES qt)
MESSAGE(STATUS ${QT_INCLUDE})

fsousa at black ~/tmp/find/build $ cmake ..
- -- Check for working C compiler: gcc
- -- Check for working C compiler: gcc -- works
- -- Check size of void*
- -- Check size of void* - done
- -- Check for working CXX compiler: c++
- -- Check for working CXX compiler: c++ -- works
- -- /usr/local/include/qt
- -- Configuring done
- -- Generating done
- -- Build files have been written to: /home/fsousa/tmp/find/build

fsousa at black ~/tmp/find/build $ cmake --version
cmake version 2.3-20060304

Here QT_INCLUDE is /usr/local/include/qt and not /usr/local/include


- --
Filipe Sousa
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (GNU/Linux)

iD8DBQFECXSlbQdNYqwwwCwRAk4MAKC3aA4JETyzjd44iJjRQtliNkvhpwCgsEyB
VuJsZG1Oy9cesTq2Rbn/oVY=
=0iwR
-----END PGP SIGNATURE-----


More information about the CMake mailing list