ECM find-modules

Yury G. Kudryashov urkud.urkud at gmail.com
Fri Jan 13 12:47:43 UTC 2012


Alexander Neundorf wrote:

> On Thursday 12 January 2012, Yury G. Kudryashov wrote:
>> Alexander Neundorf wrote:
>> > I think FindLibUSB1.cmake looks good.
>> 
>> From libusb-1.0.pc:
>> includedir=${prefix}/include
>> Cflags: -I${includedir}/libusb-1.0
>> 
>> So, PC_LIBUSB1_INCLUDE_DIR is $prefix/include and PC_LIBUSB1_INCLUDE_DIRS
>> is $prefix/include/libusb-1.0.
>>
>> Should LIBUSB1_INCLUDE_DIR and LIBUSB1_INCLUDE_DIRS follow the same
>> logic?
> 
> Eh, what ?
> But there is only one directory added using -I to the compile command,
> right ? I don't see a reason then why LIBUSB1_INCLUDE_DIR and
> LIBUSB1_INCLUDE_DIRS should contain different things.
pkg-config adds only $prefix/include/libusb-1.0 but some packages may prefer 
use
#include <libusb-1.0/libusb.h>
instead of
#include <libusb.h>

As for libusb-1.0, I don't know any package using <libusb-1.0/libusb.h>.
On the other hand, taglib sets TAGLIB_INCLUDES to $prefix/include/taglib but 
juk includes ${TAGLIB_INCLUDES}/.. to be able to use
#include <taglib/tag.h>
and not pollute "top-level" #include space by "tag.h" from taglib.

Should we support such tricks in our Find* modules?
-- 
Yury G. Kudryashov,
mailto: urkud at mccme.ru



More information about the Kde-buildsystem mailing list