At 12:03 PM 6/7/2006, frederic heem wrote: >I disagree on this point, if the user sets paths in FIND_, he expects that >cmakes searches these path, only if it fails, cmake can look for default >ones, but only if it cannot be found in the path specified by the user. >Suppose that pwlib that comes with the distribution is installed >in /usr/local, and one wants to dowload the new version in $ENV{PWLIBDIR}, >FIND_* shall look first in $ENV{PWLIBDIR}, then in /usr/local/ >The workaround is to set NO_DEFAULT_PATH, but it no longer looks for default >if pwlib is not found in $ENV{PWLIBDIR} or in a path specified in FIND_* > >> -Bill
You can do this: # first try env variable FIND_PATH(PWLIB_INCLUDE_DIR ptlib.h $ENV{PWLIBDIR}/include NO_DEFAULT_PATH ) # if it is not found then look for it in the standard places FIND_PATH(PWLIB_INCLUDE_DIR ptlib.h) -Bill _______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake