ECM find-modules

Alexander Neundorf neundorf at kde.org
Fri Jan 13 20:35:17 UTC 2012


On Friday 13 January 2012, Yury G. Kudryashov wrote:
> 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?

only if really necessary, I'd say.

Alex



More information about the Kde-buildsystem mailing list