prevent directories from search
William A. Hoffman
billlist at nycap.rr.com
Fri Feb 10 15:00:02 CET 2006
At 03:58 AM 2/10/2006, Ralf Habacker wrote:
>Ralf Habacker schrieb:
>> Hi all,
>>
>> I've encountered a problem with cmake. bzip2 is an optional library and
>> I don't like to use it.
>> Because libbz2.dll was installed on my system from another application
>> it was located into a system directory and it was detected. How to
>> prevent this ?
>>
>>
>update:
>
>now I have installed bzip2 (and openssl) and provided the related path
>with CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH with the same result. The
>libraries will be taken from the system path.
>
>Additional I have added the CMAKE_..._PATH to
>cmake/modules/FINDBZIP2.cmake to see if this will catch this without
>success.
>FIND_PATH(BZIP2_INCLUDE_DIR bzlib.h
> ${CMAKE_INCLUDE_PATH}
> /usr/include
> /usr/local/include
>)
>
>FIND_LIBRARY(BZIP2_LIBRARY NAMES bz2 bzip2
> PATHS
> ${CMAKE_LIBRARY_PATH}
> /usr/lib
> /usr/local/lib
>)
>\
You do not have to add CMAKE_LIBRARY_PATH and CMAKE_INCLUDE_PATH to those
FIND_* calls, that is done automatically. And I checked the code, and
they are checked first. How are you setting those variables? (env or
cmake variables) Also what are you setting them too. I think there is something
wrong with those varibles and that is the cause of your problem.
-Bill
More information about the Kde-buildsystem
mailing list