]> git.sesse.net Git - kdenlive/blob - CMakeLists.txt
cppcheck fixes, patch by Mikko Rapeli [3/27]
[kdenlive] / CMakeLists.txt
1 project(kdenlive)
2
3 set(BASE_VERSION 0.8.1)
4 set(LIBMLT_REQUIRED_VERSION 0.7.4)
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
18 find_package(Qt4 COMPONENTS QtCore QtGui QtOpenGL QtScript REQUIRED)
19 if ( NOT QT_QTOPENGL_FOUND )
20   message(FATAL_ERROR "QtOpenGL (most likely called libqt4-opengl-dev) not found.")
21 else ( NOT QT_QTOPENGL_FOUND )
22   message(-- " Found QtOpenGL.")
23 endif ( NOT QT_QTOPENGL_FOUND )
24 find_library(Qt COMPONENTS QtOpenGL QtScript REQUIRED)
25
26 add_definitions(${QT_DEFINITIONS})
27
28 # Search MLT package.
29 find_package(LIBMLT REQUIRED)
30 if(LIBMLT_VERSION VERSION_LESS ${LIBMLT_REQUIRED_VERSION})
31   message(FATAL_ERROR "MLT must be at least version ${LIBMLT_REQUIRED_VERSION}, you have ${LIBMLT_VERSION}\nPlease install recent MLT http://www.mltframework.org")
32 endif(LIBMLT_VERSION VERSION_LESS ${LIBMLT_REQUIRED_VERSION})
33
34 find_package(MSGFMT REQUIRED)
35 find_program(EXTRACTRC_EXECUTABLE extractrc)
36 find_program(MSGFMT_EXECUTABLE msgfmt)
37 find_program(MSGMERGE_EXECUTABLE msgmerge)
38 find_program(XGETTEXT_EXECUTABLE xgettext)
39
40 # Get current version.
41 if(RELEASE_BUILD)
42   set(VERSION "\"${BASE_VERSION}\"")
43 else(RELEASE_BUILD)
44   if(EXISTS ${PROJECT_SOURCE_DIR}/.svn)
45     # Probably a SVN workspace: determine the revision.
46     find_package(Subversion)
47     if(Subversion_FOUND)
48       Subversion_WC_INFO(${PROJECT_SOURCE_DIR} KDENLIVE)
49       message("Current revision is ${KDENLIVE_WC_REVISION}")
50       set(VERSION "\"${BASE_VERSION} (rev. ${KDENLIVE_WC_REVISION})\"")
51     else(Subversion_FOUND)
52       message("Could not determine the SVN revision")
53       set(VERSION "\"${BASE_VERSION}\"")
54     endif(Subversion_FOUND)
55   else(EXISTS ${PROJECT_SOURCE_DIR}/.svn)
56     set(VERSION "\"${BASE_VERSION}\"")
57   endif(EXISTS ${PROJECT_SOURCE_DIR}/.svn)
58 endif(RELEASE_BUILD)
59
60 add_subdirectory(src src/cmake_bindir)
61 add_subdirectory(renderer renderer/cmake_bindir)
62 add_subdirectory(thumbnailer thumbnailer/cmake_bindir)
63 add_subdirectory(plugins)
64 add_subdirectory(effects)
65 add_subdirectory(export)
66 add_subdirectory(icons)
67 add_subdirectory(data)
68 add_subdirectory(lumas)
69 add_subdirectory(titles)
70 add_subdirectory(po)
71 add_subdirectory(man)
72 add_subdirectory(doc)
73
74 configure_file(${CMAKE_SOURCE_DIR}/kdenlive-config.h.cmake kdenlive-config.h @ONLY)
75
76
77 message("-- C flags are now: " ${CMAKE_C_FLAGS})