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

3 4
# An odd patch version number means development version, while an even one means
# stable release. An additional number can be used for bugfix-only releases.
5
set(KDENLIVE_VERSION 0.8.3)
6 7 8

# Minimum versions of main dependencies.
set(LIBMLT_MIN_VERSION 0.7.6)
9 10
set(QT_MIN_VERSION 4.5.0)
set(KDE_MIN_VERSION 4.3.0)
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
11

12
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
13

14
# To be switched on when releasing.
15
option(RELEASE_BUILD "Remove Git revision from program version (use for stable releases)" OFF)
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41

# Get current version.
set(VERSION "\"${KDENLIVE_VERSION}\"")
if(NOT RELEASE_BUILD)
  if(EXISTS ${PROJECT_SOURCE_DIR}/.git)
    # Probably a Git workspace: determine the revision.
    find_package(Git)
    if(GIT_FOUND)
      exec_program(${GIT_EXECUTABLE}
        ${CMAKE_CURRENT_SOURCE_DIR}
        ARGS "describe --tags"
        OUTPUT_VARIABLE KDENLIVE_GIT_REVISION
      )
      message("Current Kdenlive Git revision is ${KDENLIVE_GIT_REVISION}")
      set(VERSION "\"${KDENLIVE_VERSION} (rev. ${KDENLIVE_GIT_REVISION})\"")
    else(GIT_FOUND)
      message("Could not determine the Git revision")
    endif(GIT_FOUND)
  endif(EXISTS ${PROJECT_SOURCE_DIR}/.git)
endif(NOT RELEASE_BUILD)

include(CheckIncludeFiles)
check_include_files(malloc.h HAVE_MALLOC_H)
check_include_files(pthread.h HAVE_PTHREAD_H)

# Search KDE and dependent packages.
42
find_package(KDE4 ${KDE_MIN_VERSION} REQUIRED)
43 44
include(KDE4Defaults)
include(MacroLibrary)
45 46 47 48 49 50 51 52
macro_log_feature(KDE4_FOUND
  "KDELibs"
  "KDE core libraries"
  "http://www.kde.org"
  TRUE
  ${KDE_MIN_VERSION}
)

53 54
# Find Qt core modules.
find_package(Qt4 ${QT_MIN_VERSION} REQUIRED QtCore QtDBus)
55

56
# Search MLT package.
57
find_package(LIBMLT ${LIBMLT_MIN_VERSION} REQUIRED)
58
if(LIBMLT_VERSION VERSION_LESS ${LIBMLT_MIN_VERSION})
59
  set(LIBMLT_FOUND FALSE)
60 61 62 63 64 65 66 67
endif(LIBMLT_VERSION VERSION_LESS ${LIBMLT_MIN_VERSION})
macro_log_feature(LIBMLT_FOUND
  "MLT"
  "Multimedia framework and video playout server for TV broadcasting"
  "http://mltframework.org"
  TRUE
  ${LIBMLT_MIN_VERSION}
)
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
68

69
add_subdirectory(data)
Alberto Villa's avatar
Alberto Villa committed
70
macro_optional_add_subdirectory(doc)
71
add_subdirectory(effects)
Alberto Villa's avatar
Alberto Villa committed
72
add_subdirectory(export)
73
add_subdirectory(icons)
Alberto Villa's avatar
Alberto Villa committed
74
add_subdirectory(lumas)
75
add_subdirectory(man)
76
add_subdirectory(plugins)
Alberto Villa's avatar
Alberto Villa committed
77
macro_optional_add_subdirectory(po)
78 79 80
add_subdirectory(renderer)
add_subdirectory(src)
add_subdirectory(thumbnailer)
81
add_subdirectory(titles)
82

83
macro_display_feature_log()
84

85
configure_file(kdenlive-config.h.cmake kdenlive-config.h @ONLY)