[CMake] Volunteering to maintain two new Find Modules

Philip Lowman philip at yhbt.com
Fri Jan 9 07:33:57 EST 2009


On Fri, Jan 9, 2009 at 7:32 AM, Philip Lowman <philip at yhbt.com> wrote:

> On Thu, Jan 8, 2009 at 5:22 PM, Albert Astals Cid <aacid at kde.org> wrote:
>
>> if (LibOpenJPEG_OPENJPEG_LIBRARY)
>>  set (LibOpenJPEG_LIBRARIES ${openjpeg_LIBRARY})
>> endif (LibOpenJPEG_OPENJPEG_LIBRARY)
>
>
> If you spot any find modules with this syntax this is wrong. The reason why
> is if LibOpenJPEG_OPENJPEG_LIBRARY is NOTFOUND then LibOpenJPEG_LIBRARIES
> will not be set to NOTFOUND and if the user is linking a target against the
> LIBRARIES variable they will get no error because the variable will expand
> to nothing.
>
> Please fix this in your new modules and if you see it anywhere report it as
> a bug.
>

Sorry, forgot to add this.  By fix I mean drop the conditional:

set(LibOpenJPEG_LIBRARIES ${openjpeg_LIBRARY})

-- 
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090109/126fd133/attachment-0001.htm>


More information about the CMake mailing list