]> git.sesse.net Git - kdenlive/blob - CMakeLists.txt
Merge branch 'buildsystem' into next
[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.8.3)
6
7 # Minimum versions of main dependencies.
8 set(LIBMLT_MIN_VERSION 0.7.6)
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       )
29       message("Current Kdenlive Git revision is ${KDENLIVE_GIT_REVISION}")
30       set(VERSION "\"${KDENLIVE_VERSION} (rev. ${KDENLIVE_GIT_REVISION})\"")
31     else(GIT_FOUND)
32       message("Could not determine the Git revision")
33     endif(GIT_FOUND)
34   endif(EXISTS ${PROJECT_SOURCE_DIR}/.git)
35 endif(NOT RELEASE_BUILD)
36
37 include(CheckIncludeFiles)
38 check_include_files(malloc.h HAVE_MALLOC_H)
39 check_include_files(pthread.h HAVE_PTHREAD_H)
40
41 # Search KDE and dependent packages.
42 find_package(KDE4 ${KDE_MIN_VERSION} REQUIRED)
43 include(KDE4Defaults)
44 include(MacroLibrary)
45 macro_log_feature(KDE4_FOUND
46   "KDELibs"
47   "KDE core libraries"
48   "http://www.kde.org"
49   TRUE
50   ${KDE_MIN_VERSION}
51 )
52
53 # Find Qt core modules.
54 find_package(Qt4 ${QT_MIN_VERSION} REQUIRED QtCore QtDBus)
55
56 # Search MLT package.
57 find_package(LIBMLT ${LIBMLT_MIN_VERSION} REQUIRED)
58 if(LIBMLT_VERSION VERSION_LESS ${LIBMLT_MIN_VERSION})
59   set(LIBMLT_FOUND FALSE)
60 endif(LIBMLT_VERSION VERSION_LESS ${LIBMLT_MIN_VERSION})
61 macro_log_feature(LIBMLT_FOUND
62   "MLT"
63   "Multimedia framework and video playout server for TV broadcasting"
64   "http://mltframework.org"
65   TRUE
66   ${LIBMLT_MIN_VERSION}
67 )
68
69 add_subdirectory(data)
70 macro_optional_add_subdirectory(doc)
71 add_subdirectory(effects)
72 add_subdirectory(export)
73 add_subdirectory(icons)
74 add_subdirectory(lumas)
75 add_subdirectory(man)
76 add_subdirectory(plugins)
77 macro_optional_add_subdirectory(po)
78 add_subdirectory(renderer)
79 add_subdirectory(src)
80 add_subdirectory(thumbnailer)
81 add_subdirectory(titles)
82
83 macro_display_feature_log()
84
85 configure_file(kdenlive-config.h.cmake kdenlive-config.h @ONLY)