[CMake] Add search paths for FIND_PACKAGE ?

Dizzy dizzy at roedu.net
Tue Nov 20 04:38:07 EST 2007


On Monday 19 November 2007 16:00:17 Mike Jackson wrote:
> Actually I run into this ALL the time (tiff, expat, hdf5) and I have
> most of mine stored in "non-Standard" locations. I end up copying the
> the FindXXX.cmake into my local project directory and then adding
> some code like the following:
>
> SET(EXPAT_INCLUDE_SEARCH_DIRS
>    $ENV{EXPAT_INSTALL}/include/expat
> )
>
> SET (EXPAT_LIB_SEARCH_DIRS
>    $ENV{EXPAT_INSTALL}/lib
>    )
>
> FIND_PATH(EXPAT_INCLUDE_DIR
>    NAMES expat.h
>    PATHS ${EXPAT_INCLUDE_SEARCH_DIRS}
>    NO_DEFAULT_PATH
>    )

According to the documentation aren't 
CMAKE_FRAMEWORK_PATH/CMAKE_APPBUNDLE_PATH/CMAKE_INCLUDE_PATH suposed to do 
that? (ie the project developer sets them with additional paths for which 
FIND_PATH() and FIND_LIBRARY() as called from various find package modules 
will look into).

-- 
Mihai RUSU					Email: dizzy at roedu.net
			"Linux is obsolete" -- AST


More information about the CMake mailing list