KDE/kdelibs
Alexander Neundorf
neundorf at kde.org
Sun Sep 16 23:58:05 CEST 2007
On Tuesday 11 September 2007 13:45, Ralf Habacker wrote:
> SVN commit 711197 by habacker:
>
> - win32 fix for KDELibsDependencies.cmake support. On win32 the path of
> installed kdelibs (KDE4_INSTALL_DIR) is determined by the location of
> kde4-config, not hardcoded
>
> Unfortunally cmake's export_library_dependencies has two problems:
> 1. it write hardcoded pathes, which does not work on win32
> 2. it does not wait until the output file is completly written, which makes
> it impossible to read this file for further processing
>
> CCMAIL:kde-buildsystem at kde.org
Ok, I see.
So there are several issues.
Simple one: the part which deals with the dependencies file is now 150 lines
long, if we don't find a way to reduce it, it should be separated into its
own file kdelibs/CreateKDELibsDependencies.cmake and then be included.
EXPORT_LIBRARY_DEPENDENCIES() writes the file at the end of a cmake run, since
then it is able to export dependencies of all libs in the project. Changing
this behaviour would be an incompatible change in cmake, so this is no option
(except with an additional argument which switches this behaviour).
These lines look not good:
set(KDE4_DATA_INSTALL_DIR \"\${KDE4_INSTALL_DIR}/share/apps\")
They *completely* ignore to what the install dirs have actually been set to
when building KDE. we can do this if we just hardcode "share/apps" as the
install destination under Windows. If this is ok with you we can do that.
Otherwise this is broken.
Full paths are not good on Windows because the package can be installed
anywhere, and then the paths to the KDE libraries are wrong. This should be
also the case for 3rd party packages like png or bzip2, which should also
have the full path to these libs in the KDELibsDependencies.cmake file. Using
this file on a different system means that all the additional libraries have
to be also in the same place as on the system where this binary KDE4 for
Windows has been built.
What can we do ?
KDELibsDependencies.cmake is a development file, so everybody who wants to
build KDE software on Windows is required to build kdelibs etc. himself, so
he gets the correct file for his machine
-> probably no acceptable option
It almost seems to me that the KDELibsDependencies.cmake file for a
installation of a binary kdelibs package under Windows should be generated by
the installer under Windows, which would overwrite the one generated at cmake
time. Is CMake available during install time ? Then we could make
KDELibsDependencies.cmake look like this:
set(KDE4_DATA_INSTALL_DIR "${KDE4_DATA_INSTALL_DIR}")
and run cmake on it at installer time (binary setup tool, not "make install")
to replace these variables with the actual destinations. It would then be a
task of this installer tool to figure them out (which it should be able to
do).
What do you think ?
Bye
Alex
More information about the Kde-buildsystem
mailing list