GNOME Bugzilla – Bug 669127
Use embedded AUTOMOC feature of CMake (>= 2.8.6) to reduce our external dependencies
Last modified: 2012-02-07 19:07:35 UTC
Created attachment 206539 [details] [review] Patch to the CMakeList files removing the external dependency on automoc Today I was trying to compile qt-gstreamer from git, and, since I have also built my own version of Qt (4.8.0), I was very reluctant to have to install automoc (and thus Qt libraries) again... Then I browsed the interwebs a bit, and found out that, from CMake 2.8.6 onwards, there is an EMBEDDED automoc feature, so that we don't need to depend on an external automoc executable anymore. I quickly patched all lines in all CMakeList's that involved automoc4_add_* to add_* and proceeded to build qt-gstreamer. It was built with no errors, the test suite ran fine and I could run my own application using qt-gstreamer also without any problems... I think it's reasonable to start requiring CMake 2.8.6 or greater, since it was launched last October, and we have already CMake 2.8.7. Plus, the upcoming Ubuntu (12.04 LTS) will already include CMake 2.8.6... So, why not sending the patch upstream? :) In the attachment you can find the patch, as given by the output of "git format-patch -1". Enjoy :D
Hi, Thanks for the patch, but I didn't (and won't) commit it as it is, as I would like to maintain support for cmake 2.8.5, which is still the default version in debian testing and ubuntu oneiric. So, I just commited a different version, which makes use of cmake's automoc feature only if the detected cmake version is >= 2.8.6 and otherwise falls back to automoc. But anyway, thanks a lot for caring and sending the patch upstream :)