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

4 5 6
# An odd minor version number means development version, while an even
# one means stable release.
set(KDENLIVE_VERSION 0.8.3)
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
7
set(LIBMLT_REQUIRED_VERSION 0.7.6)
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
8

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

11 12 13 14 15 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 42 43 44
# To be switched on when releasing.
option(RELEASE_BUILD "Remove Git position from program version (use for stable releases)" OFF)

# 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)

find_package(MSGFMT REQUIRED)
find_program(EXTRACTRC_EXECUTABLE extractrc)
find_program(MSGFMT_EXECUTABLE msgfmt)
find_program(MSGMERGE_EXECUTABLE msgmerge)
find_program(XGETTEXT_EXECUTABLE xgettext)

# Search KDE and dependent packages.
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
45
find_package(KDE4 REQUIRED)
46 47 48
include(KDE4Defaults)
include(MacroLibrary)
include(FindGettext)
49

50 51 52 53 54 55 56 57
# Search MLT package.
find_package(LIBMLT REQUIRED)
if(LIBMLT_VERSION VERSION_LESS ${LIBMLT_REQUIRED_VERSION})
  set(LIBMLT_FOUND FALSE)
endif(LIBMLT_VERSION VERSION_LESS ${LIBMLT_REQUIRED_VERSION})
macro_log_feature(LIBMLT_FOUND "MLT" "Multimedia framework and video playout server for TV broadcasting" "http://mltframework.org" TRUE ${LIBMLT_REQUIRED_VERSION})

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --std=c99") # To compile kiss_fft
58
find_package(Qt4 COMPONENTS QtCore QtGui QtOpenGL QtScript REQUIRED)
59 60 61 62 63
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 )
64
find_library(Qt COMPONENTS QtOpenGL QtScript REQUIRED)
65

66
add_definitions(${QT_DEFINITIONS})
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
67

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

82
macro_display_feature_log()
83

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