Cmake update patch for dbus master
Ralf Habacker
ralf.habacker at freenet.de
Fri Feb 5 10:35:21 PST 2010
Romain Pokrzywka schrieb:
> Hi again,
>
> Ok here is the promised patch which updates the CMake build - at last !
>
very nice :-)
> It's many things actually:
>
> - it implements a split between client and internal library like autotools do. Note that the .def file is generated
> dynamically based on build options,
looks good
> since tests/verbose-mode and others affect the symbols that are exported :-o Anyway I've tested it will all possible combinations and it's fine now. In theory the def.in files (which are combined by cmake) can be shared used by the autotools build too, but I haven't implemented it for autotools yet. Marcus: maybe that's something you could look at ?
>
> - it contains fixes for the install target: basically the DBUSDIR wouldn't be taken into account even when specified,
> and the summary was confusing regarding where things would be going for the install
>
okay,the logic seems clear now:
first try DBUSDIR
then ty DBUSDIR from env
third try DBUS_INSTALL_DIR
forth use CMAKE_INSTALL_PREFIX
> - it removes the debug postfix thing for the executables. Debug postfix only makes sense for libraries when you want to
> distinguish them or package both versions. But for executables you don't need that distinction, you'll only ship release
> versions anyway. This is how Qt is built and packaged on windows, for example: even when building in debug mode, qmake
> is still called qmake, same for designer and the others.
>
which makes problems especial with qt when configuring in
debug_and_release mode. Is it guarantated to have an executable in a
specific build mode by the build system ? The answer for qt is no
Because this feature is configurable on configure time i would not
remove it - peoples build chain may depends on this feature.
> - it contains some cleanup in the cmake files: better option scoping, removed obsolete comments, etc.
>
> - it makes DAEMON_NAME an option for cmake too, as a way to specify an alternative name for the daemon, and fixes a few
> places where it wasn't used in the code.
>
I renamed this to DBUS_DAEMON_NAME to have the same naming scheme as
other public options (see changed patch 0013 and new patch 0019)
> - it adds remaining parts of an old commit to fix the OSX build in dbus4win which hadn't been committed because some
> parts failed during merge or were already upstream.
>
> I've created the patch using: git format-patch -k --stdout rev1..rev2 > cmake_build_changes.patch
> so you have the individual commits and diffstats in one same file.
>
> I've tested it on freedesktop's dbus master branch with the command "git am -3 -k < cmake_build_changes.patch" and it
> applied cleanly, so it should be all fine and automatic, without losing the individual commits.
>
>
on Windows it was required to convert the patch file to unix eol
> It builds fine with msvc and mingw in various combinations. Only one of them fails: building with mingw with the
> DBUS_USE_OUTPUT_DEBUG_STRING option, then there's some build error related to swprintf. Doesn't seem harmful, I can look
> into this afterwards but I'd rather commit the patch now while it applies cleanly.
>
I could build the patch on msvc without any problems.
>
> Feel free to review and send your questions and comments before committing upstream. I tried making the stuff as good as
> possible and testing all combinations, but there might be some stuff in there that you don't like. I can also send you
> categorized patches with only commits specific to each item in the list above, in case you want to apply some but not
> others.
>
>
Otherrwise the patches looks good to me.
Regards
Ralf
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0019-variable-name-fix-DBUS_DAEMON_NAME-instead-of-DAEMON.patch
Url: http://lists.freedesktop.org/archives/dbus/attachments/20100205/081d1c1b/attachment.ksh
More information about the dbus
mailing list