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

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.
Ed Rogalsky's avatar
Ed Rogalsky committed
5
set(KDENLIVE_VERSION 0.9.7)
6 7

# Minimum versions of main dependencies.
8
set(MLT_MIN_VERSION 0.8.8)
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

# Get current version.
18 19 20 21 22 23 24 25 26 27 28 29 30
set(KDENLIVE_VERSION_STRING "${KDENLIVE_VERSION}")
if(NOT RELEASE_BUILD AND EXISTS ${CMAKE_SOURCE_DIR}/.git)
  # Probably a Git workspace; determine the revision.
  find_package(Git QUIET)
  if(GIT_FOUND)
    exec_program(${GIT_EXECUTABLE}
      ${CMAKE_SOURCE_DIR}
      ARGS "describe --tags"
      OUTPUT_VARIABLE KDENLIVE_GIT_REVISION
      RETURN_VALUE TAG_RESULT
    )
    # git describe --tags failed; maybe the repository was checked with depth=1.
    if(NOT ${TAG_RESULT} EQUAL 0)
31
      exec_program(${GIT_EXECUTABLE}
32 33
        ${CMAKE_SOURCE_DIR}
        ARGS "describe --always"
34 35
        OUTPUT_VARIABLE KDENLIVE_GIT_REVISION
      )
36 37 38 39 40 41 42
    endif()
    message(STATUS "Kdenlive Git revision: ${KDENLIVE_GIT_REVISION}")
    set(KDENLIVE_VERSION_STRING "${KDENLIVE_VERSION} (rev. ${KDENLIVE_GIT_REVISION})")
  else()
    message(STATUS "Kdenlive Git revision could not be determined")
  endif()
endif()
43 44 45 46 47 48

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

# Search KDE and dependent packages.
49
find_package(KDE4 ${KDE_MIN_VERSION} REQUIRED)
50 51
include(KDE4Defaults)
include(MacroLibrary)
52 53 54 55 56 57 58 59
macro_log_feature(KDE4_FOUND
  "KDELibs"
  "KDE core libraries"
  "http://www.kde.org"
  TRUE
  ${KDE_MIN_VERSION}
)

60 61
# Find Qt core modules (QtCore and QtGui).
find_package(Qt4 ${QT_MIN_VERSION} REQUIRED)
62

63
# Search MLT package.
64 65
find_package(MLT ${MLT_MIN_VERSION} REQUIRED)
macro_log_feature(MLT_FOUND
66 67 68 69
  "MLT"
  "Multimedia framework and video playout server for TV broadcasting"
  "http://mltframework.org"
  TRUE
70
  ${MLT_MIN_VERSION}
71
)
72
set(MLT_PREFIX ${MLT_ROOT_DIR})
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
73

74
add_subdirectory(data)
Alberto Villa's avatar
Alberto Villa committed
75
macro_optional_add_subdirectory(doc)
76
add_subdirectory(effects)
Alberto Villa's avatar
Alberto Villa committed
77
add_subdirectory(export)
78
add_subdirectory(icons)
Alberto Villa's avatar
Alberto Villa committed
79
add_subdirectory(lumas)
80
add_subdirectory(man)
81
add_subdirectory(plugins)
Alberto Villa's avatar
Alberto Villa committed
82
macro_optional_add_subdirectory(po)
83 84 85
add_subdirectory(renderer)
add_subdirectory(src)
add_subdirectory(thumbnailer)
86
add_subdirectory(titles)
87
add_subdirectory(testingArea)
88

89
macro_display_feature_log()
90

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