]> git.sesse.net Git - kdenlive/blob - CMakeLists.txt
Merge branch 'master' into next
[kdenlive] / CMakeLists.txt
1 project(kdenlive)
2 set(catalogname kdenlive)
3
4 # An odd patch version number means development version, while an even one means
5 # stable release. An additional number can be used for bugfix-only releases.
6 set(KDENLIVE_VERSION 0.8.3)
7
8 # Minimum versions of main dependencies.
9 set(LIBMLT_MIN_VERSION 0.7.6)
10 set(QT_MIN_VERSION 4.6.0)
11 set(KDE_MIN_VERSION 4.4.0)
12
13 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
14
15 # To be switched on when releasing.
16 option(RELEASE_BUILD "Remove Git revision from program version (use for stable releases)" OFF)
17
18 # Get current version.
19 set(VERSION "\"${KDENLIVE_VERSION}\"")
20 if(NOT RELEASE_BUILD)
21   if(EXISTS ${PROJECT_SOURCE_DIR}/.git)
22     # Probably a Git workspace: determine the revision.
23     find_package(Git)
24     if(GIT_FOUND)
25       exec_program(${GIT_EXECUTABLE}
26         ${CMAKE_CURRENT_SOURCE_DIR}
27         ARGS "describe --tags"
28         OUTPUT_VARIABLE KDENLIVE_GIT_REVISION
29       )
30       message("Current Kdenlive Git revision is ${KDENLIVE_GIT_REVISION}")
31       set(VERSION "\"${KDENLIVE_VERSION} (rev. ${KDENLIVE_GIT_REVISION})\"")
32     else(GIT_FOUND)
33       message("Could not determine the Git revision")
34     endif(GIT_FOUND)
35   endif(EXISTS ${PROJECT_SOURCE_DIR}/.git)
36 endif(NOT RELEASE_BUILD)
37
38 include(CheckIncludeFiles)
39 check_include_files(malloc.h HAVE_MALLOC_H)
40 check_include_files(pthread.h HAVE_PTHREAD_H)
41
42 find_package(MSGFMT REQUIRED)
43 find_program(EXTRACTRC_EXECUTABLE extractrc)
44 find_program(MSGFMT_EXECUTABLE msgfmt)
45 find_program(MSGMERGE_EXECUTABLE msgmerge)
46 find_program(XGETTEXT_EXECUTABLE xgettext)
47
48 # Search KDE and dependent packages.
49 find_package(KDE4 ${KDE_MIN_VERSION} REQUIRED)
50 include(KDE4Defaults)
51 include(MacroLibrary)
52 include(FindGettext)
53 macro_log_feature(KDE4_FOUND
54   "KDELibs"
55   "KDE core libraries"
56   "http://www.kde.org"
57   TRUE
58   ${KDE_MIN_VERSION}
59 )
60
61 # Find Qt core modules (QtCore and QtGui are searched by default).
62 find_package(Qt4 ${QT_MIN_VERSION} REQUIRED QtDBus)
63 macro_log_feature(QT_QTDBUS_FOUND
64   "QtDBus"
65   "Qt bindings for the D-Bus library"
66   "http://qt.nokia.com/products/qt"
67   TRUE
68   ${QT_MIN_VERSION}
69   "QtDBus library (most likely called libqt4-dbus)"
70 )
71
72 # Search MLT package.
73 find_package(LIBMLT REQUIRED)
74 if(LIBMLT_VERSION VERSION_LESS ${LIBMLT_MIN_VERSION})
75   set(LIBMLT_FOUND FALSE)
76 endif(LIBMLT_VERSION VERSION_LESS ${LIBMLT_MIN_VERSION})
77 macro_log_feature(LIBMLT_FOUND
78   "MLT"
79   "Multimedia framework and video playout server for TV broadcasting"
80   "http://mltframework.org"
81   TRUE
82   ${LIBMLT_MIN_VERSION}
83 )
84
85 add_subdirectory(data)
86 add_subdirectory(doc)
87 add_subdirectory(effects)
88 add_subdirectory(export)
89 add_subdirectory(icons)
90 add_subdirectory(lumas)
91 add_subdirectory(man)
92 add_subdirectory(plugins)
93 add_subdirectory(po)
94 add_subdirectory(renderer)
95 add_subdirectory(src)
96 add_subdirectory(thumbnailer)
97 add_subdirectory(titles)
98
99 macro_display_feature_log()
100
101 configure_file(kdenlive-config.h.cmake kdenlive-config.h @ONLY)