CMakeLists.txt 2.6 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.1)
4
set(LIBMLT_REQUIRED_VERSION 0.7)
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
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)
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 "${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 25 26

find_library(Qt COMPONENTS QtScript REQUIRED)

27
add_definitions(${QT_DEFINITIONS})
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
28

29 30 31
# Search MLT package.
find_package(LIBMLT REQUIRED)
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})
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
34

Marco Gittler's avatar
Marco Gittler committed
35 36 37 38 39 40
find_package(MSGFMT REQUIRED)
find_program(EXTRACTRC_EXECUTABLE extractrc)
find_program(MSGFMT_EXECUTABLE msgfmt)
find_program(MSGMERGE_EXECUTABLE msgmerge)
find_program(XGETTEXT_EXECUTABLE xgettext)

41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
# 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
60

61 62
add_subdirectory(src src/cmake_bindir)
add_subdirectory(renderer renderer/cmake_bindir)
63
add_subdirectory(thumbnailer thumbnailer/cmake_bindir)
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
64
add_subdirectory(plugins)
65
add_subdirectory(effects)
Alberto Villa's avatar
Alberto Villa committed
66
add_subdirectory(export)
67
add_subdirectory(icons)
Alberto Villa's avatar
Alberto Villa committed
68 69
add_subdirectory(data)
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})