]> git.sesse.net Git - kdenlive/blob - CMakeLists.txt
Add Kdenlive manual converted from UserBase QuickStart page.
[kdenlive] / CMakeLists.txt
1 project(kdenlive)
2
3 set(BASE_VERSION 0.8.1)
4 set(LIBMLT_REQUIRED_VERSION 0.7)
5
6 option(RELEASE_BUILD "Remove compilation date from program version (use for stable releases)" OFF)
7 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
8
9 # Search packages used by KDE.
10 find_package(KDE4 REQUIRED)
11 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --std=c99") # To compile kiss_fft
12 include(KDE4Defaults)
13 include(MacroLibrary)
14 include(FindGettext)
15 include(MacroOptionalAddSubdirectory)
16 set(catalogname kdenlive)
17 find_package(Qt COMPONENTS QtOpenGL)
18 if ( NOT QT_QTOPENGL_FOUND )
19   message(FATAL_ERROR "QtOpenGL (most likely called libqt4-opengl-dev) not found.")
20 else ( NOT QT_QTOPENGL_FOUND )
21   message(-- " Found QtOpenGL.")
22 endif ( NOT QT_QTOPENGL_FOUND )
23 find_library(Qt COMPONENTS QtOpenGL REQUIRED)
24
25 find_library(Qt COMPONENTS QtScript REQUIRED)
26
27 add_definitions(${QT_DEFINITIONS})
28
29 # Search MLT package.
30 find_package(LIBMLT REQUIRED)
31 if(LIBMLT_VERSION VERSION_LESS ${LIBMLT_REQUIRED_VERSION})
32   message(FATAL_ERROR "MLT must be at least version ${LIBMLT_REQUIRED_VERSION}, you have ${LIBMLT_VERSION}\nPlease install recent MLT http://www.mltframework.org")
33 endif(LIBMLT_VERSION VERSION_LESS ${LIBMLT_REQUIRED_VERSION})
34
35 find_package(MSGFMT REQUIRED)
36 find_program(EXTRACTRC_EXECUTABLE extractrc)
37 find_program(MSGFMT_EXECUTABLE msgfmt)
38 find_program(MSGMERGE_EXECUTABLE msgmerge)
39 find_program(XGETTEXT_EXECUTABLE xgettext)
40
41 # Get current version.
42 if(RELEASE_BUILD)
43   set(VERSION "\"${BASE_VERSION}\"")
44 else(RELEASE_BUILD)
45   if(EXISTS ${PROJECT_SOURCE_DIR}/.svn)
46     # Probably a SVN workspace: determine the revision.
47     find_package(Subversion)
48     if(Subversion_FOUND)
49       Subversion_WC_INFO(${PROJECT_SOURCE_DIR} KDENLIVE)
50       message("Current revision is ${KDENLIVE_WC_REVISION}")
51       set(VERSION "\"${BASE_VERSION} (rev. ${KDENLIVE_WC_REVISION})\"")
52     else(Subversion_FOUND)
53       message("Could not determine the SVN revision")
54       set(VERSION "\"${BASE_VERSION}\"")
55     endif(Subversion_FOUND)
56   else(EXISTS ${PROJECT_SOURCE_DIR}/.svn)
57     set(VERSION "\"${BASE_VERSION}\"")
58   endif(EXISTS ${PROJECT_SOURCE_DIR}/.svn)
59 endif(RELEASE_BUILD)
60
61 add_subdirectory(src src/cmake_bindir)
62 add_subdirectory(renderer renderer/cmake_bindir)
63 add_subdirectory(thumbnailer thumbnailer/cmake_bindir)
64 add_subdirectory(plugins)
65 add_subdirectory(effects)
66 add_subdirectory(export)
67 add_subdirectory(icons)
68 add_subdirectory(data)
69 add_subdirectory(lumas)
70 add_subdirectory(titles)
71 add_subdirectory(po)
72 add_subdirectory(man)
73 add_subdirectory(doc)
74
75 configure_file(${CMAKE_SOURCE_DIR}/kdenlive-config.h.cmake kdenlive-config.h @ONLY)
76
77
78 message("-- C flags are now: " ${CMAKE_C_FLAGS})