[Cmake] Looking for the solution - FIND_*

David Svoboda xsvobod2 at informatics.muni.cz
Thu, 26 Feb 2004 10:21:04 +0100


Hello,

is there anybody willing to answer my question in mail "BUG in FIND...?"
from 23rd Feb? I have the following problem. I am testing whether any user
changed the version of the library, he used before, therefore I typed:

FIND_LIBRARY(ODBC_LIB
      NAMES odbc
      PATHS ${CHOSEN_PATH})

if the ${CHOSEN_PATH} is the path like this:

	/home/david/cvs/odbc_lib/

where 'cvs' in this path is symbolic link to

	/home/david/archive/2002/packages/cvs

then FIND_LIBRARY returns

	/home/david/archive/2002/packages/cvs/odbc_lib/libodbc.so

	a not

	/home/david/cvs/odbc_lib/libodbc.so

	as I expected.

Then, the result is inconsistent with ${CHOSEN_PATH} variable, because
different path names are contained and regular expression testing for
changes in paths is impossbile. I found out, that FIND_PATH behaves in the
same way.

Is it a bug or is it correct??? And how to fix it easily?



Thank you forward for your advice!!!

David