Bug in CheckLibraryExists.cmake

William A. Hoffman billlist at nycap.rr.com
Fri Feb 10 15:56:29 CET 2006


At 09:41 AM 2/10/2006, you wrote:
>cmake from cvs:
>
>    SET(CHECK_LIBRARY_EXISTS_LIBRARIES ${LIBRARY})
>    IF(CMAKE_REQUIRED_LIBRARIES)
>      SET(CHECK_LIBRARY_EXISTS_LIBRARIES
>        ${CHECK_LIBRARY_EXISTS_LIBRARIES} ${CMAKE_REQUIRED_LIBRARIES})
>    ELSE(CMAKE_REQUIRED_LIBRARIES)
>      SET(CHECK_LIBRARY_EXISTS_LIBRARIES)
>    ENDIF(CMAKE_REQUIRED_LIBRARIES)
>
>Doesn't the "else" part remove what the first line did?
>Because of that, the LIBRARY argument seems simply unused, and the following test fails:
>
>   check_library_exists(${BZIP2_LIBRARY} BZ2_bzCompressInit "" BZIP2_NEED_PREFIX)
>(where BZIP2_LIBRARY was correctly set to /usr/lib/libbz2.so)
>
>Removing the "ELSE" part fixes the problem for me.
Yes, that is a bug that was introduced last night.  I think we found it at about
the same time you did.   Good job finding the problem!  :)
It is fixed in cvs cmake now.   I am tracking down another issue now,
but we should be creating a new cmake kde release soon.

-Bill



More information about the Kde-buildsystem mailing list