CMakeLists.txt 2.51 KB
Newer Older
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
1
2
project(kdenlive)

Till Theato's avatar
Till Theato committed
3
set(BASE_VERSION 0.8)
4
set(LIBMLT_REQUIRED_VERSION 0.5.10)
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
5

Till Theato's avatar
Till Theato committed
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)
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
8

9
# Search packages used by KDE.
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
10
find_package(KDE4 REQUIRED)
11
set(CMAKE_C_FLAGS " --std=c99") # To compile kiss_fft
12
13
14
include(KDE4Defaults)
include(MacroLibrary)
include(FindGettext)
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
15
include(MacroOptionalAddSubdirectory)
Marco Gittler's avatar
Marco Gittler committed
16
set(catalogname kdenlive)
17
18
19
20
21
22
23
find_package(Qt COMPONENTS QtOpenGL)
if ( NOT QT_QTOPENGL_FOUND )
  message(FATAL_ERROR "QtOpenGL (most likely called libqt4-opengl-dev) not found.")
else ( NOT QT_QTOPENGL_FOUND )
  message(-- " Found QtOpenGL.")
endif ( NOT QT_QTOPENGL_FOUND )
find_library(Qt COMPONENTS QtOpenGL REQUIRED)
24
add_definitions(${QT_DEFINITIONS})
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
25

26
27
28
# Search MLT package.
find_package(LIBMLT REQUIRED)
if(LIBMLT_VERSION VERSION_LESS ${LIBMLT_REQUIRED_VERSION})
29
  message(FATAL_ERROR "MLT must be at least version ${LIBMLT_REQUIRED_VERSION}, you have ${LIBMLT_VERSION}\nPlease install recent MLT http://www.mltframework.org")
30
endif(LIBMLT_VERSION VERSION_LESS ${LIBMLT_REQUIRED_VERSION})
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
31

Marco Gittler's avatar
Marco Gittler committed
32
33
34
35
36
37
find_package(MSGFMT REQUIRED)
find_program(EXTRACTRC_EXECUTABLE extractrc)
find_program(MSGFMT_EXECUTABLE msgfmt)
find_program(MSGMERGE_EXECUTABLE msgmerge)
find_program(XGETTEXT_EXECUTABLE xgettext)

38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Get current version.
if(RELEASE_BUILD)
  set(VERSION "\"${BASE_VERSION}\"")
else(RELEASE_BUILD)
  if(EXISTS ${PROJECT_SOURCE_DIR}/.svn)
    # Probably a SVN workspace: determine the revision.
    find_package(Subversion)
    if(Subversion_FOUND)
      Subversion_WC_INFO(${PROJECT_SOURCE_DIR} KDENLIVE)
      message("Current revision is ${KDENLIVE_WC_REVISION}")
      set(VERSION "\"${BASE_VERSION} (rev. ${KDENLIVE_WC_REVISION})\"")
    else(Subversion_FOUND)
      message("Could not determine the SVN revision")
      set(VERSION "\"${BASE_VERSION}\"")
    endif(Subversion_FOUND)
  else(EXISTS ${PROJECT_SOURCE_DIR}/.svn)
    set(VERSION "\"${BASE_VERSION}\"")
  endif(EXISTS ${PROJECT_SOURCE_DIR}/.svn)
endif(RELEASE_BUILD)
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
57

58
59
add_subdirectory(src src/cmake_bindir)
add_subdirectory(renderer renderer/cmake_bindir)
60
add_subdirectory(thumbnailer thumbnailer/cmake_bindir)
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
61
add_subdirectory(plugins)
62
add_subdirectory(effects)
Alberto Villa's avatar
Alberto Villa committed
63
add_subdirectory(export)
64
add_subdirectory(icons)
Alberto Villa's avatar
Alberto Villa committed
65
66
add_subdirectory(data)
add_subdirectory(lumas)
67
add_subdirectory(titles)
68
add_subdirectory(po)
69
add_subdirectory(man)
70

71
configure_file(${CMAKE_SOURCE_DIR}/kdenlive-config.h.cmake kdenlive-config.h @ONLY)
72
73


74
message("-- C flags are now: " ${CMAKE_C_FLAGS})