+include(CheckIncludeFiles)
+check_include_files(malloc.h HAVE_MALLOC_H)
+check_include_files(pthread.h HAVE_PTHREAD_H)
+
+# Search KDE and dependent packages.
+find_package(KDE4 ${KDE_MIN_VERSION} REQUIRED)
+include(KDE4Defaults)
+include(MacroLibrary)
+macro_log_feature(KDE4_FOUND
+ "KDELibs"
+ "KDE core libraries"
+ "http://www.kde.org"
+ TRUE
+ ${KDE_MIN_VERSION}
+)
+
+# Find Qt core modules (QtCore and QtGui).
+find_package(Qt4 ${QT_MIN_VERSION} REQUIRED)
+
+# Search MLT package.
+find_package(LIBMLT ${LIBMLT_MIN_VERSION} REQUIRED)
+if(LIBMLT_VERSION VERSION_LESS ${LIBMLT_MIN_VERSION})
+ set(LIBMLT_FOUND FALSE)
+endif(LIBMLT_VERSION VERSION_LESS ${LIBMLT_MIN_VERSION})
+macro_log_feature(LIBMLT_FOUND
+ "MLT"
+ "Multimedia framework and video playout server for TV broadcasting"
+ "http://mltframework.org"
+ TRUE
+ ${LIBMLT_MIN_VERSION}
+)
+
+add_subdirectory(data)
+macro_optional_add_subdirectory(doc)
+add_subdirectory(effects)
+add_subdirectory(export)
+add_subdirectory(icons)
+add_subdirectory(lumas)
+add_subdirectory(man)
+add_subdirectory(plugins)
+macro_optional_add_subdirectory(po)
+add_subdirectory(renderer)