<div dir="ltr"><div><div>Sure, these are the two that I've tried:<br><br>cmake_minimum_required(VERSION 3.7)<br>project(bug)<br>find_package (BZip2)<br>if(NOT BZIP2_LIBRARIES)<br>   message("bzip2 not found")<br>endif()<br><br></div>its output:<br>-- Could NOT find BZip2 (missing:  BZIP2_LIBRARIES BZIP2_INCLUDE_DIR) <br>bzip2 not found<br><br></div>This one with find_library:<br>cmake_minimum_required(VERSION 3.7)<br>project(bug)<br><br>find_library(BZ2_LIBRARY bz2 libbz2)<br>if(NOT BZ2_LIBRARY)<br>   message("bzip2 not found")<br>endif()<br><br>Output: bzip2 not found<br><br><div><div><div class="gmail_extra">Enrico<br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-01-29 11:40 GMT+01:00 Felix Geyer <span dir="ltr"><<a href="mailto:fgeyer@debian.org" target="_blank">fgeyer@debian.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<span class="gmail-"><br>
On 29.01.2017 02:45, enrico wrote:<br>
> Package: cmake<br>
> Version: 3.7.2-1<br>
> Severity: normal<br>
><br>
> Dear Maintainer,<br>
><br>
> Cmake can't find libbz2, nor by using find_package(BZip2) nor using find_library(). The cmake module is is the one shipped with cmake-data I think.<br>
> libbz2 is found at /lib/x86_64-linux-gnu/ and linking the so manually into /usr/lib/x86_64-linux-gnu/ seems to work.<br>
><br>
> Look at CMakeFiles/CMakeOutput.txt,the LIBRARY_PATH variable seems to be correct<br>
><br>
> LIBRARY_PATH=/usr/lib/gcc/x86_<wbr>64-linux-gnu/6/:/usr/lib/gcc/<wbr>x86_64-linux-gnu/6/../../../<wbr>x86_64-linux-gnu/:/usr/lib/<wbr>gcc/x86_64-linux-gnu/6/../../.<wbr>./../lib/:/lib/x86_64-linux-<wbr>gnu/:/lib/../lib/:/usr/lib/<wbr>x86_64-linux-gnu/:/usr/lib/../<wbr>lib/:/usr/lib/gcc/x86_64-<wbr>linux-gnu/6/../../../:/lib/:/<wbr>usr/lib/<br>
><br>
> I guess that something is wrong with find_library.<br>
> What would be the preferred work around for this?<br>
<br>
</span>Works fine here (and in the automated tests).<br>
<br>
Can you please test this in a fresh project that just contains "find_package(BZip2)"?<br>
<span class="gmail-HOEnZb"><font color="#888888"><br>
Felix<br>
</font></span></blockquote></div><br></div></div></div></div>