]> git.sesse.net Git - kdenlive/blobdiff - CMakeLists.txt
Reorganise (again) the build system
[kdenlive] / CMakeLists.txt
index 28a04d6311ae23131cf3a95cb795e8163a6c975c..45d37d452a5844276802b1310f4cc527d1b39dc9 100644 (file)
@@ -1,15 +1,19 @@
 project(kdenlive)
 set(catalogname kdenlive)
 
-# An odd minor version number means development version, while an even
-# one means stable release.
+# An odd patch version number means development version, while an even one means
+# stable release. An additional number can be used for bugfix-only releases.
 set(KDENLIVE_VERSION 0.8.3)
-set(LIBMLT_REQUIRED_VERSION 0.7.6)
+
+# Minimum versions of main dependencies.
+set(LIBMLT_MIN_VERSION 0.7.6)
+set(QT_MIN_VERSION 4.6.0)
+set(KDE_MIN_VERSION 4.4.0)
 
 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
 
 # To be switched on when releasing.
-option(RELEASE_BUILD "Remove Git position from program version (use for stable releases)" OFF)
+option(RELEASE_BUILD "Remove Git revision from program version (use for stable releases)" OFF)
 
 # Get current version.
 set(VERSION "\"${KDENLIVE_VERSION}\"")
@@ -42,28 +46,41 @@ find_program(MSGMERGE_EXECUTABLE msgmerge)
 find_program(XGETTEXT_EXECUTABLE xgettext)
 
 # Search KDE and dependent packages.
-find_package(KDE4 REQUIRED)
+find_package(KDE4 ${KDE_MIN_VERSION} REQUIRED)
 include(KDE4Defaults)
 include(MacroLibrary)
 include(FindGettext)
+macro_log_feature(KDE4_FOUND
+  "KDELibs"
+  "KDE core libraries"
+  "http://www.kde.org"
+  TRUE
+  ${KDE_MIN_VERSION}
+)
+
+# Find Qt core modules (QtCore and QtGui are searched by default).
+find_package(Qt4 ${QT_MIN_VERSION} REQUIRED QtDBus)
+macro_log_feature(QT_QTDBUS_FOUND
+  "QtDBus"
+  "Qt bindings for the D-Bus library"
+  "http://qt.nokia.com/products/qt"
+  TRUE
+  ${QT_MIN_VERSION}
+  "QtDBus library (most likely called libqt4-dbus)"
+)
 
 # Search MLT package.
 find_package(LIBMLT REQUIRED)
-if(LIBMLT_VERSION VERSION_LESS ${LIBMLT_REQUIRED_VERSION})
+if(LIBMLT_VERSION VERSION_LESS ${LIBMLT_MIN_VERSION})
   set(LIBMLT_FOUND FALSE)
-endif(LIBMLT_VERSION VERSION_LESS ${LIBMLT_REQUIRED_VERSION})
-macro_log_feature(LIBMLT_FOUND "MLT" "Multimedia framework and video playout server for TV broadcasting" "http://mltframework.org" TRUE ${LIBMLT_REQUIRED_VERSION})
-
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --std=c99") # To compile kiss_fft
-find_package(Qt4 COMPONENTS QtCore QtGui QtOpenGL QtScript REQUIRED)
-if ( NOT QT_QTOPENGL_FOUND )
-  message(FATAL_ERROR "QtOpenGL (most likely called libqt4-opengl-dev) not found.")
-else ( NOT QT_QTOPENGL_FOUND )
-  message(-- " Found QtOpenGL.")
-endif ( NOT QT_QTOPENGL_FOUND )
-find_library(Qt COMPONENTS QtOpenGL QtScript REQUIRED)
-
-add_definitions(${QT_DEFINITIONS})
+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)
 add_subdirectory(doc)
@@ -74,9 +91,9 @@ add_subdirectory(lumas)
 add_subdirectory(man)
 add_subdirectory(plugins)
 add_subdirectory(po)
-add_subdirectory(renderer renderer/cmake_bindir)
-add_subdirectory(src src/cmake_bindir)
-add_subdirectory(thumbnailer thumbnailer/cmake_bindir)
+add_subdirectory(renderer)
+add_subdirectory(src)
+add_subdirectory(thumbnailer)
 add_subdirectory(titles)
 
 macro_display_feature_log()