KDE Multimedia SVN to GIT : Migrate your own module Cookbook

Christian Esken (KDE) esken at kde.org
Fri Mar 16 22:15:01 GMT 2012


Hello,

after Trever sent his "great KDEMM migration" mail, I tried to convert
my KMix project. I needed only some minor (obvious) adjustments to my
CMakeLists.txt. Here's my cookbook, in the hope it is useful for your
own KDE MM projects.

1) Add the following to your CMakeLists.txt

set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
# search packages used by KDE
find_package(KDE4 REQUIRED)
include(KDE4Defaults)
include(MacroLibrary)


2) Add checks for required and optinal components.

To find them, you might want to check like this:
egrep -i 'if.*(HAVE_|_FOUND|alsa|pulse|cd|dvd|codec|video|audio|sound|
driver)' CMakeLists.txt | grep -v endif | sort -u

Copy suitable lines from the SVN kde-multimedia/CMakeLists.txt to your
own CMakeLists.txt. For example ALSA requires the following line:

find_package(Alsa)

3) Now run cmake and build
Please check whether all your optional components are checked and
detected. Compare it with the output from the SVN cmake run.


It worked for me, and I hope for you as well. I got a working executable
in about five minutes.

Have fun with it,
     Christian



More information about the kde-multimedia mailing list