CMakeLists.txt 2.13 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.7.9)
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 12 13
include(KDE4Defaults)
include(MacroLibrary)
include(FindGettext)
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
14
include(MacroOptionalAddSubdirectory)
Marco Gittler's avatar
Marco Gittler committed
15
set(catalogname kdenlive)
16
add_definitions(${QT_DEFINITIONS})
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
17

18 19 20
# Search MLT package.
find_package(LIBMLT REQUIRED)
if(LIBMLT_VERSION VERSION_LESS ${LIBMLT_REQUIRED_VERSION})
21
  message(FATAL_ERROR "MLT must be at least version ${LIBMLT_REQUIRED_VERSION}, you have ${LIBMLT_VERSION}\nPlease install recent MLT http://www.mltframework.org")
22
endif(LIBMLT_VERSION VERSION_LESS ${LIBMLT_REQUIRED_VERSION})
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
23

Marco Gittler's avatar
Marco Gittler committed
24 25 26 27 28 29
find_package(MSGFMT REQUIRED)
find_program(EXTRACTRC_EXECUTABLE extractrc)
find_program(MSGFMT_EXECUTABLE msgfmt)
find_program(MSGMERGE_EXECUTABLE msgmerge)
find_program(XGETTEXT_EXECUTABLE xgettext)

30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
# 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
49

50 51
add_subdirectory(src src/cmake_bindir)
add_subdirectory(renderer renderer/cmake_bindir)
52
add_subdirectory(thumbnailer thumbnailer/cmake_bindir)
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
53
add_subdirectory(plugins)
54
add_subdirectory(effects)
Alberto Villa's avatar
Alberto Villa committed
55
add_subdirectory(export)
56
add_subdirectory(icons)
Alberto Villa's avatar
Alberto Villa committed
57 58
add_subdirectory(data)
add_subdirectory(lumas)
59
add_subdirectory(titles)
60
add_subdirectory(po)
61
add_subdirectory(man)
62

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