]> git.sesse.net Git - kdenlive/blob - CMakeLists.txt
Fix label
[kdenlive] / CMakeLists.txt
1 project(kdenlive)
2
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.7)
6
7 # Minimum versions of main dependencies.
8 set(LIBMLT_MIN_VERSION 0.8.8)
9 set(QT_MIN_VERSION 4.5.0)
10 set(KDE_MIN_VERSION 4.3.0)
11
12 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
13
14 # To be switched on when releasing.
15 option(RELEASE_BUILD "Remove Git revision from program version (use for stable releases)" OFF)
16
17 # Get current version.
18 set(VERSION "\"${KDENLIVE_VERSION}\"")
19 if(NOT RELEASE_BUILD)
20   if(EXISTS ${PROJECT_SOURCE_DIR}/.git)
21     # Probably a Git workspace: determine the revision.
22     find_package(Git)
23     if(GIT_FOUND)
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
29       )
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
36         )
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})\"")
40     else(GIT_FOUND)
41       message("Could not determine the Git revision")
42     endif(GIT_FOUND)
43   endif(EXISTS ${PROJECT_SOURCE_DIR}/.git)
44 endif(NOT RELEASE_BUILD)
45
46 include(CheckIncludeFiles)
47 check_include_files(malloc.h HAVE_MALLOC_H)
48 check_include_files(pthread.h HAVE_PTHREAD_H)
49
50 # Search KDE and dependent packages.
51 find_package(KDE4 ${KDE_MIN_VERSION} REQUIRED)
52 include(KDE4Defaults)
53 include(MacroLibrary)
54 macro_log_feature(KDE4_FOUND
55   "KDELibs"
56   "KDE core libraries"
57   "http://www.kde.org"
58   TRUE
59   ${KDE_MIN_VERSION}
60 )
61
62 # Find Qt core modules (QtCore and QtGui).
63 find_package(Qt4 ${QT_MIN_VERSION} REQUIRED)
64
65 # Search MLT package.
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
71   "MLT"
72   "Multimedia framework and video playout server for TV broadcasting"
73   "http://mltframework.org"
74   TRUE
75   ${LIBMLT_MIN_VERSION}
76 )
77
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)
84 add_subdirectory(man)
85 add_subdirectory(plugins)
86 macro_optional_add_subdirectory(po)
87 add_subdirectory(renderer)
88 add_subdirectory(src)
89 add_subdirectory(thumbnailer)
90 add_subdirectory(titles)
91 add_subdirectory(testingArea)
92
93 macro_display_feature_log()
94
95 configure_file(config-kdenlive.h.cmake config-kdenlive.h @ONLY)