X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=CMakeLists.txt;h=d0e99d2f2cc7409f5335d0490416bb075584488a;hb=4ae3260592acc87712db77b7d3fe0cc2be7d76bc;hp=49e288ee17f09d31d58d7198e67e18f7b3415b1d;hpb=1ecbd5b62783247938e9873868e6ce625ef23b6c;p=kdenlive diff --git a/CMakeLists.txt b/CMakeLists.txt index 49e288ee..d0e99d2f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,20 +1,95 @@ project(kdenlive) +# 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. +set(KDENLIVE_VERSION 0.9.7) -set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules ) +# Minimum versions of main dependencies. +set(LIBMLT_MIN_VERSION 0.8.8) +set(QT_MIN_VERSION 4.5.0) +set(KDE_MIN_VERSION 4.3.0) -# search packages used by KDE -find_package(KDE4 REQUIRED) -include (KDE4Defaults) -include (MacroLibrary) -include(MacroOptionalAddSubdirectory) +set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) -add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS}) -include_directories (${QDBUS_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES} ${CMAKE_SOURCE_DIR}/widgets) +# To be switched on when releasing. +option(RELEASE_BUILD "Remove Git revision from program version (use for stable releases)" OFF) -FIND_PACKAGE(LIBMLT REQUIRED) -FIND_PACKAGE(LIBMLTPLUS REQUIRED) -FIND_PACKAGE(LIBFFMPEG REQUIRED) +# 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 + RETURN_VALUE TAG_RESULT + ) + # git describe --tags failed, for example it fails if repo was checked with depth=1 + if(NOT ${TAG_RESULT} EQUAL 0) + exec_program(${GIT_EXECUTABLE} + ${CMAKE_CURRENT_SOURCE_DIR} + ARGS "describe --always" + OUTPUT_VARIABLE KDENLIVE_GIT_REVISION + ) + endif(NOT ${TAG_RESULT} EQUAL 0) + 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. +find_package(KDE4 ${KDE_MIN_VERSION} REQUIRED) +include(KDE4Defaults) +include(MacroLibrary) +macro_log_feature(KDE4_FOUND + "KDELibs" + "KDE core libraries" + "http://www.kde.org" + TRUE + ${KDE_MIN_VERSION} +) + +# Find Qt core modules (QtCore and QtGui). +find_package(Qt4 ${QT_MIN_VERSION} REQUIRED) + +# Search MLT package. +find_package(LIBMLT ${LIBMLT_MIN_VERSION} REQUIRED) +if(LIBMLT_VERSION VERSION_LESS ${LIBMLT_MIN_VERSION}) + set(LIBMLT_FOUND FALSE) +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} +) + +add_subdirectory(data) +macro_optional_add_subdirectory(doc) +add_subdirectory(effects) +add_subdirectory(export) +add_subdirectory(icons) +add_subdirectory(lumas) +add_subdirectory(man) +add_subdirectory(plugins) +macro_optional_add_subdirectory(po) +add_subdirectory(renderer) add_subdirectory(src) - \ No newline at end of file +add_subdirectory(thumbnailer) +add_subdirectory(titles) +add_subdirectory(testingArea) + +macro_display_feature_log() + +configure_file(config-kdenlive.h.cmake config-kdenlive.h @ONLY)