KDE/kdelibs
Alexander Neundorf
neundorf at kde.org
Thu Nov 26 18:44:12 CET 2009
On Thursday 26 November 2009, Alexander Neundorf wrote:
> On Thursday 26 November 2009, Sebastian Trueg wrote:
> > Well, I see now that my action was not the greatest. I apologize.
> > However, disabling Nepomuk altogether is not a solution either. What is
> > so broken about the cmake file anyway? "not in an acceptable state" does
> > not tell me anything.
> > I am more than willing to improve the situation.
>
> Great :-)
>
> What is broken:
> as I wrote in reply to your commit:
> http://techbase.kde.org/Policies/CMake_Coding_Style#.28Not.29_Using_pkg-con
>fig
>
> "the FindXXX.cmake must also work without pkg-config, as long as the
> package is either installed to one of the default locations (as /usr or
> /usr/local) or if CMAKE_PREFIX_PATH is set accordingly"
Why must must it work also without pkg-config ?
Because
-pkg-config does not exist on every platform
-we already set CMAKE_PREFIX_PATH for telling cmake where to look for things,
it is unnecessary to require that another environment variable has to be set
for the same purpose
-in general it is a bad thing to execute any programs during the
configure-step, including pkg-config, for cross compiling. So if possible it
should be avoided.
Also, the variables didn't have the right prefix (variables from
FindSharedDesktopOntologies.cmake should have SHAREDDESKTOPONTOLOGIES_ as
prefix)
Also, the variables used for pkg-config should have a different prefix than
the ones which are used by find_path(), otherwise there can be unexpected
behaviour. So please prefix the variables for pkg-config additionally
with "PC_".
Also, since it is basically only some data files, a simple find_path() should
really do.
Also, the documentation could be somewhat improved:
"# - Try to find shared-desktop-ontologies
# Once done this will define"
Like, what it is and where to get it from.
Once this is done, things like checking for the version which is installed can
be added, and maybe also there might be some support to check whether the
files which are then actually used, exist.
Alex
More information about the Kde-buildsystem
mailing list