Strange commit to FindKDE4Internal.cmake
Pau Garcia i Quiles
pgquiles at elpauer.org
Sun Feb 19 14:13:54 UTC 2012
>> On Linux/BSD/etc, most people never download or use the source tarball
>> for libfoo. When they are developing, they would download libfoo-dev.
>> Where are they going to take FindLibFoo.cmake from if they never used
>> libfoo.tar.gz in the first place?
>
> In the future from extra-cmake-modules.
What if the piece of software I'm talking about is not part of KDE?
If I'm the author of libfoo, IMHO it makes a lot of sense to
distribute a FindLibFoo.cmake in libfoo.tar.gz.
If I'm the packager of libfoo in, say, Debian, it makes a lot of sense
to install a reference FindLibFoo.cmake in some place where it is
easily available for developers which will use libfoo-dev.
Please note I've never said FindLibFoo.cmake should be installed in
/usr/lib/cmake-2.8/Modules. For instance, in the the Wt package I
maintain for Debian, FindWt.cmake will be installed to
/usr/share/doc/libwt-dev/cmake.
>> > FindXXX.cmake is not .pc file (pkg-config) equivalent as it doesn't
>> > provide exact library location in system, just a way to find it.
>>
>> That's what FooConfig.cmake is for. We are talking about a different thing
>> here.
>
> No, it's completely related.
I'd say we are still talking about two different things. This is how I see it:
- FooConfig.cmake is useful to find LibFoo when it is *already*
*installed* in *this* *system*. It's comparable to .pc files.
- A reference FindLibFoo.cmake is useful for developers who want to
make sure libfoo will be located on *any* platform, be it Linux,
Windows, Mac or something else. FooConfig.cmake is probably of little
use on Windows, which is why I, as a developer of TheGreatApp (an
application based on libfoo) would copy
/usr/share/doc/libfoo-dev/cmake/FindLibFoo.cmake to TheGreatApp/cmake,
add TheGreatApp/cmake to CMAKE_MODULE_PATH and use find_package(foo
REQUIRED). Especially if TheGreatApp is not a KDE application, which
has no reason to use or know about extra-cmake-modules.
--
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
More information about the Kde-buildsystem
mailing list