3 set(BASE_VERSION 0.8.1)
4 set(LIBMLT_REQUIRED_VERSION 0.7.4)
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)
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
15 include(MacroOptionalAddSubdirectory)
16 set(catalogname kdenlive)
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)
26 add_definitions(${QT_DEFINITIONS})
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})
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)
40 # Get current version.
42 set(VERSION "\"${BASE_VERSION}\"")
44 if(EXISTS ${PROJECT_SOURCE_DIR}/.svn)
45 # Probably a SVN workspace: determine the revision.
46 find_package(Subversion)
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)
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)
74 configure_file(${CMAKE_SOURCE_DIR}/kdenlive-config.h.cmake kdenlive-config.h @ONLY)
77 message("-- C flags are now: " ${CMAKE_C_FLAGS})