3 # An odd patch version number means development version, while an even one means
4 # stable release. An additional number can be used for bugfix-only releases.
5 set(KDENLIVE_VERSION 0.9.5)
7 # Minimum versions of main dependencies.
8 set(LIBMLT_MIN_VERSION 0.8.6)
9 set(QT_MIN_VERSION 4.5.0)
10 set(KDE_MIN_VERSION 4.3.0)
12 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
14 # To be switched on when releasing.
15 option(RELEASE_BUILD "Remove Git revision from program version (use for stable releases)" OFF)
17 # Get current version.
18 set(VERSION "\"${KDENLIVE_VERSION}\"")
20 if(EXISTS ${PROJECT_SOURCE_DIR}/.git)
21 # Probably a Git workspace: determine the revision.
24 exec_program(${GIT_EXECUTABLE}
25 ${CMAKE_CURRENT_SOURCE_DIR}
26 ARGS "describe --tags"
27 OUTPUT_VARIABLE KDENLIVE_GIT_REVISION
28 RETURN_VALUE TAG_RESULT
30 # git describe --tags failed, for example it fails if repo was checked with depth=1
31 if(NOT ${TAG_RESULT} EQUAL 0)
32 exec_program(${GIT_EXECUTABLE}
33 ${CMAKE_CURRENT_SOURCE_DIR}
34 ARGS "describe --always"
35 OUTPUT_VARIABLE KDENLIVE_GIT_REVISION
37 endif(NOT ${TAG_RESULT} EQUAL 0)
38 message("Current Kdenlive Git revision is ${KDENLIVE_GIT_REVISION}")
39 set(VERSION "\"${KDENLIVE_VERSION} (rev. ${KDENLIVE_GIT_REVISION})\"")
41 message("Could not determine the Git revision")
43 endif(EXISTS ${PROJECT_SOURCE_DIR}/.git)
44 endif(NOT RELEASE_BUILD)
46 include(CheckIncludeFiles)
47 check_include_files(malloc.h HAVE_MALLOC_H)
48 check_include_files(pthread.h HAVE_PTHREAD_H)
50 # Search KDE and dependent packages.
51 find_package(KDE4 ${KDE_MIN_VERSION} REQUIRED)
54 macro_log_feature(KDE4_FOUND
62 # Find Qt core modules (QtCore and QtGui).
63 find_package(Qt4 ${QT_MIN_VERSION} REQUIRED)
66 find_package(LIBMLT ${LIBMLT_MIN_VERSION} REQUIRED)
67 if(LIBMLT_VERSION VERSION_LESS ${LIBMLT_MIN_VERSION})
68 set(LIBMLT_FOUND FALSE)
69 endif(LIBMLT_VERSION VERSION_LESS ${LIBMLT_MIN_VERSION})
70 macro_log_feature(LIBMLT_FOUND
72 "Multimedia framework and video playout server for TV broadcasting"
73 "http://mltframework.org"
78 add_subdirectory(data)
79 macro_optional_add_subdirectory(doc)
80 add_subdirectory(effects)
81 add_subdirectory(export)
82 add_subdirectory(icons)
83 add_subdirectory(lumas)
85 add_subdirectory(plugins)
86 macro_optional_add_subdirectory(po)
87 add_subdirectory(renderer)
89 add_subdirectory(thumbnailer)
90 add_subdirectory(titles)
91 add_subdirectory(testingArea)
93 macro_display_feature_log()
95 configure_file(config-kdenlive.h.cmake config-kdenlive.h @ONLY)