kdeexamples buildsystem
Michael Jansen
kde at michael-jansen.biz
Thu Jul 14 15:17:11 CEST 2011
Hi
I just had a look at the HowToInstallALibrary example and have some questions.
1. Why on earth does the example introduce LIB_INSTALL_DIR_SUFFIX instead of
LIB_SUFFIX. I am fighting quite a uphill battle in non kde projects to
consider LIB_SUFFIX the standard and to just use it for the least surprise of
a user?
2. I know the cmake documentation is quite ... Just have a look at the file
readme.txt from the Modules/ directory and compare especially the
recommendations about "This should (not) be a cache entry)" to the reality.
But the cmake documentation says: from find_package
> Config mode provides an elaborate interface and search procedure.
> Much of the interface is provided for completeness and for use
> internally by find-modules loaded by Module mode.
And here we go and ignore that. Are we sure this is the right thing to do?
3. And then there is the problem that the config mode looks there:
> CMake constructs a set of possible installation prefixes for the package.
> Under each prefix several directories are searched for a configuration
> file. The tables below show the directories searched. Each entry is meant
> for installation trees following Windows (W), UNIX (U), or Apple (A)
> conventions.
>
> <prefix>/ (W)
> <prefix>/(cmake|CMake)/ (W)
> <prefix>/<name>*/ (W)
> <prefix>/<name>*/(cmake|CMake)/ (W)
> <prefix>/(share|lib)/cmake/<name>*/ (U)
> <prefix>/(share|lib)/<name>*/ (U)
> <prefix>/(share|lib)/<name>*/(cmake|CMake)/ (U)
>
What it does not tell is that it looks into lib64 too. Or else we would not
find anything on opensuse. But you can't influence that. In a find module i at
least could look only into the correct directories. But cmake has anyway poor
support for systems with both 32 and 64bit devel packages. The best is to use
pkgconfig ... then it works best.
So i must say i don't completly agree with that example module.
Mike
More information about the Kde-buildsystem
mailing list