- Require at least Qt 4.6 and KDE 4.4.
- List dependencies when configuring.
- Cleanup Qt dependencies handling. There is no need anymore to
include specific Qt libraries in target_link_libraries(), as
QT_LIBRARIES will be adjusted according to the modules requested in
find_package().
- Move from platform checks to feature checks (should solve problems
on GNU/kFreeBSD). Some Mac OS X checks are still there: I'll see
what to do with them.
- Make Video4Linux support optional.
- Last (and least), tidy up CMakeLists.txt.
project(kdenlive)
set(catalogname kdenlive)
-# An odd minor version number means development version, while an even
-# one means stable release.
+# 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.8.3)
-set(LIBMLT_REQUIRED_VERSION 0.7.6)
+
+# Minimum versions of main dependencies.
+set(LIBMLT_MIN_VERSION 0.7.6)
+set(QT_MIN_VERSION 4.6.0)
+set(KDE_MIN_VERSION 4.4.0)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
# To be switched on when releasing.
-option(RELEASE_BUILD "Remove Git position from program version (use for stable releases)" OFF)
+option(RELEASE_BUILD "Remove Git revision from program version (use for stable releases)" OFF)
# Get current version.
set(VERSION "\"${KDENLIVE_VERSION}\"")
find_program(XGETTEXT_EXECUTABLE xgettext)
# Search KDE and dependent packages.
-find_package(KDE4 REQUIRED)
+find_package(KDE4 ${KDE_MIN_VERSION} REQUIRED)
include(KDE4Defaults)
include(MacroLibrary)
include(FindGettext)
+macro_log_feature(KDE4_FOUND
+ "KDELibs"
+ "KDE core libraries"
+ "http://www.kde.org"
+ TRUE
+ ${KDE_MIN_VERSION}
+)
+
+# Find Qt core modules (QtCore and QtGui are searched by default).
+find_package(Qt4 ${QT_MIN_VERSION} REQUIRED QtDBus)
+macro_log_feature(QT_QTDBUS_FOUND
+ "QtDBus"
+ "Qt bindings for the D-Bus library"
+ "http://qt.nokia.com/products/qt"
+ TRUE
+ ${QT_MIN_VERSION}
+ "QtDBus library (most likely called libqt4-dbus)"
+)
# Search MLT package.
find_package(LIBMLT REQUIRED)
-if(LIBMLT_VERSION VERSION_LESS ${LIBMLT_REQUIRED_VERSION})
+if(LIBMLT_VERSION VERSION_LESS ${LIBMLT_MIN_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
-find_package(Qt4 COMPONENTS QtCore QtGui QtOpenGL QtScript REQUIRED)
-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 )
-find_library(Qt COMPONENTS QtOpenGL QtScript REQUIRED)
-
-add_definitions(${QT_DEFINITIONS})
+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)
add_subdirectory(doc)
add_subdirectory(man)
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(renderer)
+add_subdirectory(src)
+add_subdirectory(thumbnailer)
add_subdirectory(titles)
macro_display_feature_log()
#cmakedefine VERSION @VERSION@
+#cmakedefine HAVE_MALLOC_H 1
+#cmakedefine HAVE_PTHREAD_H 1
+
#endif
+find_package(OpenGL REQUIRED)
+find_package(Qt4 ${QT_MIN_VERSION} REQUIRED QtOpenGL QtScript)
+if(APPLE)
+ find_package(SDL REQUIRED)
+endif(APPLE)
macro_optional_find_package(Nepomuk)
macro_optional_find_package(QJSON)
+option(WITH_V4L "Build capture support with Video4Linux" ON)
+option(WITH_JogShuttle "Build Jog/Shuttle support" ON)
+
+if(WITH_V4L)
+ # This can be changed to support FreeBSD as soon as we move to a newer V4L2
+ # header.
+ check_include_files(linux/ioctl.h HAVE_LINUX_IOCTL_H)
+ if(HAVE_LINUX_IOCTL_H)
+ set(BUILD_V4L TRUE)
+ endif(HAVE_LINUX_IOCTL_H)
+endif(WITH_V4L)
+
+if(WITH_JogShuttle)
+ check_include_files(linux/input.h HAVE_LINUX_INPUT_H)
+ if(HAVE_LINUX_INPUT_H)
+ set(BUILD_JogShuttle TRUE)
+ endif(HAVE_LINUX_INPUT_H)
+endif(WITH_JogShuttle)
+
+macro_log_feature(QT_QTOPENGL_FOUND
+ "QtOpenGL"
+ "Qt bindings for the OpenGL library"
+ "http://qt.nokia.com/products/qt"
+ TRUE
+ ${QT_MIN_VERSION}
+ "QtOpenGL library and headers (most likely called libqt4-opengl and libqt4-opengl-dev)"
+)
+
+macro_log_feature(QT_QTSCRIPT_FOUND
+ "QtScript"
+ "Qt module providing core scripting facilities"
+ "http://qt.nokia.com/products/qt"
+ TRUE
+ ${QT_MIN_VERSION}
+ "QtScript library (most likely called libqt4-script)"
+)
+
+if(APPLE)
+ macro_log_feature(SDL_FOUND
+ "SDL"
+ "Cross-platform multimedia library"
+ "http://www.libsdl.org"
+ TRUE
+ )
+endif(APPLE)
+
+macro_log_feature(Nepomuk_FOUND
+ "Nepomuk"
+ "Support for the Nepomuk semantic desktop system"
+ "http://nepomuk.semanticdesktop.org"
+)
+
+macro_log_feature(QJSON_FOUND
+ "QJson"
+ "Qt-based library that maps JSON data to QVariant objects"
+ "http://qjson.sourceforge.net"
+ FALSE
+ ""
+ "Required to build the rotoscoping filter"
+)
+
add_subdirectory(audioscopes)
add_subdirectory(beziercurve)
add_subdirectory(blackmagic)
add_subdirectory(stopmotion)
if(QJSON_FOUND)
- add_subdirectory(rotoscoping)
add_subdirectory(onmonitoritems/rotoscoping)
- include_directories(QJSON_INCLUDE_DIR)
- set(optional_libs ${optional_libs} ${QJSON_LIBRARIES})
- add_definitions(-DQJSON)
-else(QJSON_FOUND)
- message(STATUS "Install QJson to use the rotoscoping filter")
+ add_subdirectory(rotoscoping)
endif(QJSON_FOUND)
-if(NOT APPLE AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND NOT CMAKE_SYSTEM_NAME STREQUAL "GNU/kFreeBSD")
+if(BUILD_V4L)
add_subdirectory(v4l)
-endif(NOT APPLE AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND NOT CMAKE_SYSTEM_NAME STREQUAL "GNU/kFreeBSD")
-
-include_directories(
- ${KDE4_INCLUDE_DIR}
- ${KDE4_INCLUDE_DIR}/KDE
- ${QT_INCLUDES}
- ${LIBMLT_INCLUDE_DIR}
- ${LIBMLTPLUS_INCLUDE_DIR}
- ${QDBUS_INCLUDE_DIRS}
- ${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_BINARY_DIR}
-)
-
-if(Nepomuk_FOUND)
- include_directories(NEPOMUK_INCLUDES)
- set(optional_libs ${optional_libs} ${NEPOMUK_LIBRARIES})
- add_definitions(-DNEPOMUK)
-endif(Nepomuk_FOUND)
-
-if(Q_WS_X11)
- include_directories(${X11_Xlib_INCLUDE_PATH})
-endif(Q_WS_X11)
-
-if(APPLE)
- find_package(OpenGL)
- set(QT_USE_QTOPENGL TRUE)
-else(APPLE)
- macro_optional_find_package(OpenGL)
-endif(APPLE)
+endif(BUILD_V4L)
+list(APPEND kdenlive_SRCS
+ main.cpp
+ mainwindow.cpp
-link_libraries(
- ${LIBMLT_LIBRARY}
- ${LIBMLTPLUS_LIBRARY}
- ${optional_libs}
+ KoSliderCombo.cpp
+ abstractclipitem.cpp
+ abstractgroupitem.cpp
+ abstractmonitor.cpp
+ abstractscopewidget.cpp
+ archivewidget.cpp
+ audiosignal.cpp
+ choosecolorwidget.cpp
+ clipdurationdialog.cpp
+ clipitem.cpp
+ clipmanager.cpp
+ clipproperties.cpp
+ cliptranscode.cpp
+ colorpickerwidget.cpp
+ colorplaneexport.cpp
+ colortools.cpp
+ complexparameter.cpp
+ cornerswidget.cpp
+ customruler.cpp
+ customtrackscene.cpp
+ customtrackview.cpp
+ docclipbase.cpp
+ documentchecker.cpp
+ documentvalidator.cpp
+ doubleparameterwidget.cpp
+ dragvalue.cpp
+ dvdwizard.cpp
+ dvdwizardchapters.cpp
+ dvdwizardmenu.cpp
+ dvdwizardvob.cpp
+ effectslist.cpp
+ effectslistview.cpp
+ effectslistwidget.cpp
+ effectstackedit.cpp
+ effectstackview.cpp
+ encodingprofilesdialog.cpp
+ folderprojectitem.cpp
+ gentime.cpp
+ geometryval.cpp
+ geometrywidget.cpp
+ graphicsscenerectmove.cpp
+ guide.cpp
+ headertrack.cpp
+ initeffects.cpp
+ kdenlivedoc.cpp
+ kdenlivesettingsdialog.cpp
+ keyframeedit.cpp
+ keyframehelper.cpp
+ kis_cubic_curve.cpp
+ kis_curve_widget.cpp
+ kthumb.cpp
+ managecapturesdialog.cpp
+ markerdialog.cpp
+ mltdevicecapture.cpp
+ monitor.cpp
+ monitoreditwidget.cpp
+ monitormanager.cpp
+ monitorscene.cpp
+ noteswidget.cpp
+ parameterplotter.cpp
+ positionedit.cpp
+ profilesdialog.cpp
+ projectitem.cpp
+ projectlist.cpp
+ projectlistview.cpp
+ projectsettings.cpp
+ recmonitor.cpp
+ renderer.cpp
+ renderwidget.cpp
+ slideshowclip.cpp
+ smallruler.cpp
+ spacerdialog.cpp
+ statusbarmessagelabel.cpp
+ subprojectitem.cpp
+ timecode.cpp
+ timecodedisplay.cpp
+ titledocument.cpp
+ titlewidget.cpp
+ trackdialog.cpp
+ tracksconfigdialog.cpp
+ trackview.cpp
+ transition.cpp
+ transitionsettings.cpp
+ unicodedialog.cpp
+ wizard.cpp
)
-kde4_add_ui_files(kdenlive_UI
- widgets/timeline_ui.ui
- widgets/recmonitor_ui.ui
+kde4_add_ui_files(kdenlive_UIS
+ widgets/addtrack_ui.ui
+ widgets/archivewidget_ui.ui
+ widgets/audiospectrum_ui.ui
+ widgets/backupdialog_ui.ui
+ widgets/bezierspline_ui.ui
+ widgets/boolval_ui.ui
+ widgets/clipdurationdialog_ui.ui
+ widgets/clipproperties_ui.ui
+ widgets/cliptranscode_ui.ui
widgets/colorclip_ui.ui
- widgets/slideshowclip_ui.ui
- widgets/configmisc_ui.ui
+ widgets/colorplaneexport_ui.ui
+ widgets/configcapture_ui.ui
widgets/configenv_ui.ui
- widgets/configtimeline_ui.ui
+ widgets/configjogshuttle_ui.ui
+ widgets/configmisc_ui.ui
+ widgets/configproject_ui.ui
widgets/configsdl_ui.ui
- widgets/configcapture_ui.ui
+ widgets/configtimeline_ui.ui
widgets/configtranscode_ui.ui
- widgets/configproject_ui.ui
+ widgets/dvdwizardchapters_ui.ui
+ widgets/dvdwizardmenu_ui.ui
+ widgets/dvdwizardstatus_ui.ui
+ widgets/dvdwizardvob_ui.ui
widgets/effectlist_ui.ui
widgets/effectstack_ui.ui
- widgets/profiledialog_ui.ui
- widgets/projectsettings_ui.ui
+ widgets/geometryval_ui.ui
+ widgets/geometrywidget_ui.ui
+ widgets/histogram_ui.ui
+ widgets/keyframedialog_ui.ui
+ widgets/keyframeeditor_ui.ui
widgets/keyframewidget_ui.ui
widgets/listval_ui.ui
- widgets/wipeval_ui.ui
- widgets/boolval_ui.ui
- widgets/titlewidget_ui.ui
- widgets/unicodedialog_ui.ui
- widgets/timelinebuttons_ui.ui
+ widgets/managecaptures_ui.ui
+ widgets/manageencodingprofile_ui.ui
+ widgets/markerdialog_ui.ui
+ widgets/missingclips_ui.ui
+ widgets/monitoreditwidget_ui.ui
+ widgets/profiledialog_ui.ui
+ widgets/projectsettings_ui.ui
+ widgets/recmonitor_ui.ui
widgets/renderwidget_ui.ui
+ widgets/rgbparade_ui.ui
widgets/saveprofile_ui.ui
- widgets/transitionsettings_ui.ui
- widgets/configjogshuttle_ui.ui
- widgets/trackheader_ui.ui
- widgets/clipproperties_ui.ui
- widgets/markerdialog_ui.ui
- widgets/keyframedialog_ui.ui
- widgets/clipdurationdialog_ui.ui
- widgets/managecaptures_ui.ui
- widgets/geometryval_ui.ui
- widgets/wizardstandard_ui.ui
- widgets/wizardextra_ui.ui
- widgets/wizardcapture_ui.ui
- widgets/wizardcheck_ui.ui
- widgets/wizardmltcheck_ui.ui
+ widgets/slideshowclip_ui.ui
+ widgets/smconfig_ui.ui
widgets/spacerdialog_ui.ui
- widgets/addtrack_ui.ui
- widgets/dvdwizardvob_ui.ui
- widgets/dvdwizardmenu_ui.ui
- widgets/dvdwizardstatus_ui.ui
- widgets/dvdwizardchapters_ui.ui
- widgets/missingclips_ui.ui
- widgets/cliptranscode_ui.ui
+ widgets/spectrogram_ui.ui
+ widgets/stopmotion_ui.ui
widgets/templateclip_ui.ui
- widgets/keyframeeditor_ui.ui
+ widgets/timeline_ui.ui
+ widgets/timelinebuttons_ui.ui
+ widgets/titlewidget_ui.ui
+ widgets/trackheader_ui.ui
widgets/tracksconfigdialog_ui.ui
+ widgets/transitionsettings_ui.ui
+ widgets/unicodedialog_ui.ui
widgets/urlval_ui.ui
widgets/vectorscope_ui.ui
- widgets/colorplaneexport_ui.ui
widgets/waveform_ui.ui
- widgets/rgbparade_ui.ui
- widgets/histogram_ui.ui
- widgets/geometrywidget_ui.ui
- widgets/stopmotion_ui.ui
- widgets/audiospectrum_ui.ui
- widgets/spectrogram_ui.ui
- widgets/smconfig_ui.ui
- widgets/bezierspline_ui.ui
- widgets/monitoreditwidget_ui.ui
- widgets/archivewidget_ui.ui
- widgets/manageencodingprofile_ui.ui
- widgets/backupdialog_ui.ui
-)
-
-set(kdenlive_SRCS
- ${kdenlive_SRCS}
- main.cpp
- mainwindow.cpp
- customruler.cpp
- smallruler.cpp
- projectlist.cpp
- projectitem.cpp
- monitor.cpp
- gentime.cpp
- renderer.cpp
- kdenlivedoc.cpp
- projectlistview.cpp
- trackview.cpp
- docclipbase.cpp
- timecode.cpp
- monitormanager.cpp
- headertrack.cpp
- customtrackview.cpp
- clipitem.cpp
- kthumb.cpp
- clipmanager.cpp
- effectslist.cpp
- initeffects.cpp
- effectslistview.cpp
- effectstackview.cpp
- effectstackedit.cpp
- parameterplotter.cpp
- profilesdialog.cpp
- projectsettings.cpp
- kdenlivesettingsdialog.cpp
- complexparameter.cpp
- titlewidget.cpp
- unicodedialog.cpp
- graphicsscenerectmove.cpp
- effectslistwidget.cpp
- titledocument.cpp
- transition.cpp
- renderwidget.cpp
- abstractclipitem.cpp
- transitionsettings.cpp
- recmonitor.cpp
- clipproperties.cpp
- slideshowclip.cpp
- markerdialog.cpp
- guide.cpp
- statusbarmessagelabel.cpp
- clipdurationdialog.cpp
- managecapturesdialog.cpp
- geometryval.cpp
- wizard.cpp
- customtrackscene.cpp
- abstractgroupitem.cpp
- keyframehelper.cpp
- spacerdialog.cpp
- dvdwizardvob.cpp
- dvdwizardmenu.cpp
- dvdwizard.cpp
- documentchecker.cpp
- dvdwizardchapters.cpp
- documentvalidator.cpp
- cliptranscode.cpp
- keyframeedit.cpp
- positionedit.cpp
- trackdialog.cpp
- subprojectitem.cpp
- folderprojectitem.cpp
- KoSliderCombo.cpp
- kis_cubic_curve.cpp
- kis_curve_widget.cpp
- timecodedisplay.cpp
- tracksconfigdialog.cpp
- abstractscopewidget.cpp
- colorplaneexport.cpp
- colortools.cpp
- colorpickerwidget.cpp
- choosecolorwidget.cpp
- monitorscene.cpp
- geometrywidget.cpp
- doubleparameterwidget.cpp
- audiosignal.cpp
- cornerswidget.cpp
- dragvalue.cpp
- monitoreditwidget.cpp
- noteswidget.cpp
- archivewidget.cpp
- mltdevicecapture.cpp
- abstractmonitor.cpp
- encodingprofilesdialog.cpp
+ widgets/wipeval_ui.ui
+ widgets/wizardcapture_ui.ui
+ widgets/wizardcheck_ui.ui
+ widgets/wizardextra_ui.ui
+ widgets/wizardmltcheck_ui.ui
+ widgets/wizardstandard_ui.ui
)
-add_definitions(${KDE4_DEFINITIONS})
+if(OPENGL_FOUND)
+ list(APPEND kdenlive_SRCS videoglwidget.cpp)
+endif(OPENGL_FOUND)
-if(CMAKE_SYSTEM_NAME STREQUAL "GNU/kFreeBSD")
- add_definitions(-DQ_OS_KFREEBSD)
-endif(CMAKE_SYSTEM_NAME STREQUAL "GNU/kFreeBSD")
+if(BUILD_JogShuttle)
+ list(APPEND kdenlive_SRCS
+ jogaction.cpp
+ jogshuttle.cpp
+ jogshuttleconfig.cpp
+ )
+endif(BUILD_JogShuttle)
-if(APPLE OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "NetBSD" OR CMAKE_SYSTEM_NAME STREQUAL "GNU/kFreeBSD" OR NO_JOGSHUTTLE)
- add_definitions(-DNO_JOGSHUTTLE)
-else(APPLE OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "NetBSD" OR CMAKE_SYSTEM_NAME STREQUAL "GNU/kFreeBSD" OR NO_JOGSHUTTLE)
- set(kdenlive_SRCS jogshuttle.cpp jogaction.cpp jogshuttleconfig.cpp ${kdenlive_SRCS})
-endif(APPLE OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "NetBSD" OR CMAKE_SYSTEM_NAME STREQUAL "GNU/kFreeBSD" OR NO_JOGSHUTTLE)
+kde4_add_kcfg_files(kdenlive_SRCS kdenlivesettings.kcfgc)
+qt4_add_dbus_adaptor(kdenlive_SRCS
+ org.kdenlive.MainWindow.xml
+ mainwindow.h
+ MainWindow
+)
+qt4_add_resources(kdenlive_SRCS widgets/resources.qrc)
+kde4_add_executable(kdenlive
+ ${kdenlive_SRCS}
+ ${kdenlive_UIS}
+)
-if(APPLE OR OPENGL_FOUND)
- add_definitions(-DUSE_OPEN_GL)
- set(kdenlive_SRCS videoglwidget.cpp ${kdenlive_SRCS})
-endif(APPLE OR OPENGL_FOUND)
+# To compile kiss_fft.
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --std=c99")
-# Add libdl
-find_library(DL_LIB NAMES ${CMAKE_DL_LIBS})
-message(STATUS "using dl library: ${DL_LIB}")
+# KDE definitions and include directories *must* always come first, Qt follows
+# (to avoid breaking builds when KDE and/or Qt are installed to different
+# prefixes).
+add_definitions(${KDE4_DEFINITIONS})
-kde4_add_kcfg_files(kdenlive_SRCS kdenlivesettings.kcfgc)
-qt4_add_dbus_adaptor(kdenlive_SRCS org.kdenlive.MainWindow.xml mainwindow.h MainWindow)
-qt4_add_resources(kdenlive_SRCS widgets/resources.qrc)
-kde4_add_executable(kdenlive ${kdenlive_SRCS} ${kdenlive_UI})
+include_directories(
+ ${KDE4_INCLUDES} # Adds Qt include directories too.
+ ${LIBMLT_INCLUDE_DIR}
+ ${LIBMLTPLUS_INCLUDE_DIR}
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+)
-set(KNEWSTUFF_LIBS ${KDE4_KNEWSTUFF3_LIBS})
+# Adds Qt definitions and include directories, and sets QT_LIBRARIES according
+# to the components requested in find_package().
+include(UseQt4)
target_link_libraries(kdenlive
${KDE4_KDEUI_LIBS}
${KDE4_KIO_LIBS}
- ${KNEWSTUFF_LIBS}
- ${LIBMLTPLUS_LIBRARY}
- ${LIBMLT_LIBRARY}
- ${optional_libs}
+ ${KDE4_KNEWSTUFF3_LIBS}
${KDE4_KNOTIFYCONFIG_LIBRARY}
${KDE4_KROSSUI_LIBS}
+ ${QT_LIBRARIES}
+ ${LIBMLT_LIBRARY}
+ ${LIBMLTPLUS_LIBRARY}
${CMAKE_DL_LIBS}
${CMAKE_THREAD_LIBS_INIT}
- ${QT_QTSCRIPT_LIBRARY}
)
if(Q_WS_X11)
+ include_directories(${X11_Xlib_INCLUDE_PATH})
target_link_libraries(kdenlive ${X11_LIBRARIES})
endif(Q_WS_X11)
-if(APPLE)
- find_package(SDL REQUIRED)
- target_link_libraries(kdenlive ${SDL_LIBRARY})
- target_link_libraries(kdenlive ${QT_QTOPENGL_LIBRARY})
+if(OPENGL_FOUND AND QT_QTOPENGL_FOUND)
+ add_definitions(-DUSE_OPENGL)
target_link_libraries(kdenlive ${OPENGL_LIBRARIES})
-else(APPLE)
- add_definitions(-DHAVE_V4L2)
- if(OPENGL_FOUND)
- target_link_libraries(kdenlive ${QT_QTOPENGL_LIBRARY})
- target_link_libraries(kdenlive ${OPENGL_LIBRARIES})
- endif(OPENGL_FOUND)
-endif(APPLE)
+endif(OPENGL_FOUND AND QT_QTOPENGL_FOUND)
+
+if(SDL_FOUND)
+ target_link_libraries(kdenlive ${SDL_LIBRARY})
+endif(SDL_FOUND)
+
+if(Nepomuk_FOUND)
+ add_definitions(-DUSE_NEPOMUK)
+ include_directories(${NEPOMUK_INCLUDES})
+ target_link_libraries(kdenlive ${NEPOMUK_LIBRARIES})
+endif(Nepomuk_FOUND)
+
+if(QJSON_FOUND)
+ add_definitions(-DUSE_QJSON)
+ include_directories(${QJSON_INCLUDE_DIR})
+ target_link_libraries(kdenlive ${QJSON_LIBRARIES})
+endif(QJSON_FOUND)
+
+if(BUILD_V4L)
+ add_definitions(-DUSE_V4L)
+endif(BUILD_V4L)
+
+if(BUILD_JogShuttle)
+ add_definitions(-DUSE_JOGSHUTTLE)
+endif(BUILD_JogShuttle)
install(TARGETS kdenlive DESTINATION ${BIN_INSTALL_DIR})
-install(FILES kdenliveui.rc kdenlive.notifyrc DESTINATION ${DATA_INSTALL_DIR}/kdenlive)
+install(FILES
+ kdenliveui.rc
+ kdenlive.notifyrc
+ DESTINATION ${DATA_INSTALL_DIR}/kdenlive
+)
install(FILES kdenlivesettings.kcfg DESTINATION ${KCFG_INSTALL_DIR})
-install(FILES kdenlive.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
+install(FILES
+ kdenlive_projectprofiles.knsrc
+ kdenlive_renderprofiles.knsrc
+ kdenlive_titles.knsrc
+ kdenlive_wipes.knsrc
+ kdenlivetranscodingrc
+ DESTINATION ${CONFIG_INSTALL_DIR}
+)
kde4_install_icons(${ICON_INSTALL_DIR})
-install(FILES kdenlive_titles.knsrc kdenlive_wipes.knsrc kdenlive_renderprofiles.knsrc kdenlive_projectprofiles.knsrc kdenlivetranscodingrc DESTINATION ${CONFIG_INSTALL_DIR})
+install(FILES kdenlive.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
#include "kdenlivesettings.h"
#include "kthumb.h"
#include "profilesdialog.h"
-#ifdef QJSON
+#ifdef USE_QJSON
#include "rotoscoping/rotowidget.h"
#endif
if (!effects.contains(i))
effects[i] = effect.cloneNode().toElement();
updateNormalKeyframes(param);
-#ifdef QJSON
+#ifdef USE_QJSON
} else if (type == "roto-spline") {
if (!effects.contains(i))
effects[i] = effect.cloneNode().toElement();
#include "doubleparameterwidget.h"
#include "cornerswidget.h"
#include "beziercurve/beziersplinewidget.h"
-#ifdef QJSON
+#ifdef USE_QJSON
#include "rotoscoping/rotowidget.h"
#endif
QString depends = pa.attribute("depends");
if (!depends.isEmpty())
meetDependency(paramName, type, EffectsList::parameter(d, depends));
-#ifdef QJSON
+#ifdef USE_QJSON
} else if (type == "roto-spline") {
RotoWidget *roto = new RotoWidget(value, m_monitor, info, m_timecode, this);
roto->slotShowScene(!disable);
QString depends = pa.attributes().namedItem("depends").nodeValue();
if (!depends.isEmpty())
meetDependency(paramName, type, EffectsList::parameter(newparam, depends));
-#ifdef QJSON
+#ifdef USE_QJSON
} else if (type == "roto-spline") {
RotoWidget *widget = static_cast<RotoWidget *>(m_valueItems.value(paramName));
setValue = widget->getSpline();
#include "kdenlivesettingsdialog.h"
#include "profilesdialog.h"
-#if !defined(Q_OS_FREEBSD) && !defined(Q_OS_KFREEBSD)
+#ifdef USE_V4L
#include "v4l/v4lcapture.h"
#endif
#include "blackmagic/devices.h"
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
-#ifndef NO_JOGSHUTTLE
+#ifdef USE_JOGSHUTTLE
#include "jogaction.h"
#include "jogshuttleconfig.h"
#include <linux/input.h>
-#endif /* NO_JOGSHUTTLE */
+#endif
KdenliveSettingsDialog::KdenliveSettingsDialog(const QMap<QString, QString>& mappable_actions, QWidget * parent) :
QWidget *p4 = new QWidget;
m_configCapture.setupUi(p4);
-#if !defined(Q_WS_MAC) && !defined(Q_OS_FREEBSD) && !defined(Q_OS_KFREEBSD)
+#ifdef USE_V4L
// Video 4 Linux device detection
for (int i = 0; i < 10; i++) {
m_page4 = addPage(p4, i18n("Capture"), "media-record");
m_configCapture.tabWidget->setCurrentIndex(KdenliveSettings::defaultcapture());
-#ifdef Q_WS_MAC
+#ifndef USE_V4L
m_configCapture.tabWidget->setEnabled(false);
m_configCapture.kcfg_defaultcapture->setEnabled(false);
- m_configCapture.label->setText(i18n("Capture is not yet available on OS X."));
+ m_configCapture.label->setText(i18n("Capture is not yet available on this platform."));
#endif
QWidget *p5 = new QWidget;
m_configShuttle.setupUi(p5);
-#ifdef NO_JOGSHUTTLE
- m_configShuttle.kcfg_enableshuttle->hide();
- m_configShuttle.kcfg_enableshuttle->setDisabled(true);
-#else
+#ifdef USE_JOGSHUTTLE
connect(m_configShuttle.kcfg_enableshuttle, SIGNAL(stateChanged(int)), this, SLOT(slotCheckShuttle(int)));
connect(m_configShuttle.shuttledevicelist, SIGNAL(activated(int)), this, SLOT(slotUpdateShuttleDevice(int)));
slotCheckShuttle(KdenliveSettings::enableshuttle());
if (i < actions_map.size())
button->setCurrentIndex(action_pos[actions_map[i]]);
}
-#endif /* NO_JOGSHUTTLE */
+#else /* ! USE_JOGSHUTTLE */
+ m_configShuttle.kcfg_enableshuttle->hide();
+ m_configShuttle.kcfg_enableshuttle->setDisabled(true);
+#endif /* USE_JOGSHUTTLE */
m_page5 = addPage(p5, i18n("JogShuttle"), "input-mouse");
QWidget *p6 = new QWidget;
m_configSdl.setupUi(p6);
-#if not defined(Q_WS_MAC) && not defined(USE_OPEN_GL)
+#ifndef USE_OPENGL
m_configSdl.kcfg_openglmonitors->setHidden(true);
#endif
m_configEnv.kcfg_defaultimageapp->setText(service->exec());
}
-#ifndef NO_JOGSHUTTLE
+#ifdef USE_JOGSHUTTLE
void KdenliveSettingsDialog::slotCheckShuttle(int state)
{
m_configShuttle.config_group->setEnabled(state);
m_configShuttle.kcfg_shuttledevice->setText(device);
}
-#endif /* NO_JOGSHUTTLE */
+#endif /* USE_JOGSHUTTLE */
void KdenliveSettingsDialog::updateWidgets()
{
// Revert widgets to last saved state (for example when user pressed "Cancel")
// kDebug() << "// // // KCONFIG Revert called";
-#ifndef NO_JOGSHUTTLE
+#ifdef USE_JOGSHUTTLE
// revert jog shuttle device
if (m_configShuttle.shuttledevicelist->count() > 0) {
for (int i = 0; i < m_configShuttle.shuttledevicelist->count(); i++) {
if (i < actions_map.size())
button->setCurrentIndex(action_pos[actions_map[i]]);
}
-#endif
+#endif /* USE_JOGSHUTTLE */
}
void KdenliveSettingsDialog::updateSettings()
saveTranscodeProfiles();
}
-#ifndef NO_JOGSHUTTLE
+#ifdef USE_JOGSHUTTLE
m_shuttleModified = false;
QStringList actions;
void KdenliveSettingsDialog::slotShuttleModified()
{
-#ifndef NO_JOGSHUTTLE
+#ifdef USE_JOGSHUTTLE
QStringList actions;
actions << "monitor_pause"; // the Job rest position action.
foreach (KComboBox* button, m_shuttle_buttons) {
private slots:
void slotUpdateDisplay();
-#ifndef NO_JOGSHUTTLE
+#ifdef USE_JOGSHUTTLE
void slotCheckShuttle(int state = 0);
void slotUpdateShuttleDevice(int ix = 0);
-#endif /* NO_JOGSHUTTLE */
+#endif
void slotEditImageApplication();
void slotEditAudioApplication();
void slotEditVideoApplication();
#ifndef KISS_FFT_H
#define KISS_FFT_H
+#include "kdenlive-config.h"
+
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <string.h>
-#if !defined(__APPLE__) && !defined(__FreeBSD__)
+#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif
#include "renderwidget.h"
#include "renderer.h"
#include "audiosignal.h"
-#ifndef NO_JOGSHUTTLE
+#ifdef USE_JOGSHUTTLE
#include "jogshuttle.h"
#include "jogaction.h"
#include "jogshuttleconfig.h"
-#endif /* NO_JOGSHUTTLE */
+#endif
#include "clipproperties.h"
#include "wizard.h"
#include "commands/editclipcommand.h"
m_activeTimeline(NULL),
m_recMonitor(NULL),
m_renderWidget(NULL),
-#ifndef NO_JOGSHUTTLE
+#ifdef USE_JOGSHUTTLE
m_jogProcess(NULL),
m_jogShuttle(NULL),
-#endif /* NO_JOGSHUTTLE */
+#endif
m_findActivated(false),
m_stopmotion(NULL)
{
connect(m_recMonitor, SIGNAL(addProjectClip(KUrl)), this, SLOT(slotAddProjectClip(KUrl)));
connect(m_recMonitor, SIGNAL(addProjectClipList(KUrl::List)), this, SLOT(slotAddProjectClipList(KUrl::List)));
connect(m_recMonitor, SIGNAL(showConfigDialog(int, int)), this, SLOT(slotPreferences(int, int)));
-#endif
+#endif /* ! Q_WS_MAC */
m_monitorManager->initMonitors(m_clipMonitor, m_projectMonitor, m_recMonitor);
m_notesDock = new QDockWidget(i18n("Project Notes"), this);
m_projectList->slotAddClip(urls);
}
-#ifndef NO_JOGSHUTTLE
+#ifdef USE_JOGSHUTTLE
activateShuttleDevice();
-#endif /* NO_JOGSHUTTLE */
+#endif
m_projectListDock->raise();
actionCollection()->addAssociatedWidget(m_clipMonitor->container());
m_effectList->reloadEffectList(m_effectsMenu, m_effectActions);
}
-#ifndef NO_JOGSHUTTLE
+#ifdef USE_JOGSHUTTLE
void MainWindow::activateShuttleDevice()
{
delete m_jogShuttle;
connect(m_jogShuttle, SIGNAL(forward(double)), m_monitorManager, SLOT(slotForward(double)));
connect(m_jogShuttle, SIGNAL(action(const QString&)), this, SLOT(slotDoAction(const QString&)));
}
-#endif /* NO_JOGSHUTTLE */
+#endif /* USE_JOGSHUTTLE */
void MainWindow::slotDoAction(const QString& action_name)
{
if (w->exec() == QDialog::Accepted) {
QString profile = w->selectedProfile();
m_activeDocument->setProjectFolder(w->selectedFolder());
-#ifndef Q_WS_MAC
+#ifndef Q_WS_MAC
m_recMonitor->slotUpdateCaptureFolder(m_activeDocument->projectFolder().path(KUrl::AddTrailingSlash));
#endif
if (m_renderWidget) m_renderWidget->setDocumentPath(m_activeDocument->projectFolder().path(KUrl::AddTrailingSlash));
m_activeDocument = doc;
m_activeTimeline->updateProjectFps();
m_activeDocument->checkProjectClips();
-#ifndef Q_WS_MAC
+#ifndef Q_WS_MAC
m_recMonitor->slotUpdateCaptureFolder(m_activeDocument->projectFolder().path(KUrl::AddTrailingSlash));
#endif
//Update the mouse position display so it will display in DF/NDF format by default based on the project setting.
void MainWindow::slotUpdateCaptureFolder()
{
-#ifndef Q_WS_MAC
+#ifndef Q_WS_MAC
if (m_activeDocument) m_recMonitor->slotUpdateCaptureFolder(m_activeDocument->projectFolder().path(KUrl::AddTrailingSlash));
else m_recMonitor->slotUpdateCaptureFolder(KdenliveSettings::defaultprojectfolder());
#endif
// Update list of transcoding profiles
loadTranscoders();
-#ifndef NO_JOGSHUTTLE
+#ifdef USE_JOGSHUTTLE
activateShuttleDevice();
-#endif /* NO_JOGSHUTTLE */
+#endif
}
class RecMonitor;
class CustomTrackView;
class RenderWidget;
-#ifndef NO_JOGSHUTTLE
+#ifdef USE_JOGSHUTTLE
class JogShuttle;
class JogShuttleAction;
-#endif /* NO_JOGSHUTTLE */
+#endif
class DocClipBase;
class Render;
class Transition;
RenderWidget *m_renderWidget;
-#ifndef NO_JOGSHUTTLE
+#ifdef USE_JOGSHUTTLE
JogShuttle *m_jogProcess;
JogShuttleAction* m_jogShuttle;
-#endif /* NO_JOGSHUTTLE */
+#endif
KRecentFilesAction *m_fileOpenRecent;
KAction *m_fileRevert;
void readOptions();
void saveOptions();
-#ifndef NO_JOGSHUTTLE
+#ifdef USE_JOGSHUTTLE
void activateShuttleDevice();
-#endif /* NO_JOGSHUTTLE */
+#endif
void connectDocumentInfo(KdenliveDoc *doc);
void findAhead();
void doOpenFile(const KUrl &url, KAutoSaveFile *stale);
createOpenGlWidget(m_videoBox, profile);
monitorCreated = true;
//m_glWidget->setFixedSize(width, height);
-#elif defined (USE_OPEN_GL)
+#elif defined(USE_OPENGL)
if (KdenliveSettings::openglmonitors()) {
monitorCreated = createOpenGlWidget(m_videoBox, profile);
}
render = new Render(m_name, (int) m_monitorRefresh->winId(), profile, this);
m_monitorRefresh->setRenderer(render);
}
-#if defined (USE_OPEN_GL)
+#ifdef USE_OPENGL
else if (m_glWidget) {
lay->addWidget(m_glWidget);
m_videoBox->setLayout(lay);
return m_name;
}
-#if defined(Q_WS_MAC) || defined(USE_OPEN_GL)
+#ifdef USE_OPENGL
bool Monitor::createOpenGlWidget(QWidget *parent, const QString profile)
{
render = new Render(m_name, 0, profile, this);
if (m_overlay) return;
if (m_monitorRefresh == NULL) {
// Using OpenGL display
-#if defined(Q_WS_MAC) || defined(USE_OPEN_GL)
+#ifdef USE_OPENGL
if (m_glWidget->layout()) delete m_glWidget->layout();
m_overlay = new Overlay();
connect(m_overlay, SIGNAL(editMarker()), this, SLOT(slotEditMarker()));
if (m_monitorRefresh) {
m_monitorRefresh->setVisible(!show);
} else {
-#if defined(Q_WS_MAC) || defined(USE_OPEN_GL)
+#ifdef USE_OPENGL
m_glWidget->setVisible(!show);
#endif
}
#include "renderer.h"
#include "timecodedisplay.h"
#include "abstractmonitor.h"
-#if defined(Q_WS_MAC) || defined(USE_OPEN_GL)
+#ifdef USE_OPENGL
#include "videoglwidget.h"
#endif
* Necessary because sometimes we get two signals, e.g. we get a clip and we get selected transition = NULL. */
bool m_loopClipTransition;
-#if defined(Q_WS_MAC) || defined(USE_OPEN_GL)
+#ifdef USE_OPENGL
VideoGLWidget *m_glWidget;
bool createOpenGlWidget(QWidget *parent, const QString profile);
#endif
#include "stopmotion.h"
#include "blackmagic/devices.h"
-#if !defined(Q_OS_FREEBSD) && !defined(Q_OS_KFREEBSD)
+#ifdef USE_V4L
#include "v4l/v4lcapture.h"
#endif
#include "slideshowclip.h"
// Found a BlackMagic device
}
if (QFile::exists(KdenliveSettings::video4vdevice())) {
-#if !defined(Q_WS_MAC) && !defined(Q_OS_FREEBSD) && !defined(Q_OS_KFREEBSD)
+#ifdef USE_V4L
// Video 4 Linux device detection
for (int i = 0; i < 10; i++) {
QString path = "/dev/video" + QString::number(i);
}
}
}
-#endif
+#endif /* USE_V4L */
}
connect(capture_device, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateDeviceHandler()));
}
m_layout->removeWidget(m_frame_preview);
if (data == "v4l") {
-#if !defined(Q_WS_MAC) && !defined(Q_OS_FREEBSD) && !defined(Q_OS_KFREEBSD)
+#ifdef USE_V4L
m_bmCapture = new V4lCaptureHandler(m_layout);
m_bmCapture->setDevice(capture_device->itemData(capture_device->currentIndex(), Qt::UserRole + 1).toString(), capture_device->itemData(capture_device->currentIndex(), Qt::UserRole + 2).toString());
#endif
#ifndef __V4LCAPTUREHANDLER_H__
#define __V4LCAPTUREHANDLER_H__
-#ifndef __APPLE__
#include "src.h"
-#endif
#include <QWidget>
#include <QObject>
#include "wizard.h"
#include "kdenlivesettings.h"
#include "profilesdialog.h"
-#if !defined(Q_OS_FREEBSD) && !defined(Q_OS_KFREEBSD)
+#ifdef USE_V4L
#include "v4l/v4lcapture.h"
#endif
#include "kdenlive-config.h"
void Wizard::slotDetectWebcam()
{
-#if !defined(Q_WS_MAC) && !defined(Q_OS_FREEBSD) && !defined(Q_OS_KFREEBSD)
+#ifdef USE_V4L
m_capture.v4l_devices->blockSignals(true);
m_capture.v4l_devices->clear();
if (!found) m_capture.v4l_devices->setCurrentIndex(0);
} else m_capture.v4l_status->setText(i18n("No device found, plug your webcam and refresh."));
m_capture.v4l_devices->blockSignals(false);
-#endif
+#endif /* USE_V4L */
}
void Wizard::slotUpdateCaptureParameters()