From: Alberto Villa Date: Wed, 9 Nov 2011 11:26:00 +0000 (+0100) Subject: Merge branch 'buildsystem' into next X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=43d27d5a89c1081ff69b79a5949fc87e873781d6;hp=6ee97189c48f7e8271aa04fb34b650c1ae1037d2;p=kdenlive Merge branch 'buildsystem' into next --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 45d37d45..95d78dcd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,8 +7,8 @@ set(KDENLIVE_VERSION 0.8.3) # 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(QT_MIN_VERSION 4.5.0) +set(KDE_MIN_VERSION 4.3.0) set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) @@ -58,16 +58,8 @@ macro_log_feature(KDE4_FOUND ${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)" -) +# Find Qt core modules. +find_package(Qt4 ${QT_MIN_VERSION} REQUIRED QtCore QtDBus) # Search MLT package. find_package(LIBMLT REQUIRED) diff --git a/renderer/CMakeLists.txt b/renderer/CMakeLists.txt index c6513b28..744cdf65 100644 --- a/renderer/CMakeLists.txt +++ b/renderer/CMakeLists.txt @@ -1,29 +1,20 @@ +# Check src/CMakeLists.txt for detailed comments on the contents of this file. - -include_directories ( - ${QDBUS_INCLUDE_DIRS} - ${KDE4_INCLUDES} - ${CMAKE_SOURCE_DIR} - ${CMAKE_BINARY_DIR} -) - -LINK_LIBRARIES( -${LIBMLT_LIBRARY} -${LIBMLTPLUS_LIBRARY} -${optional_libs} -) - -set(kdenlive_render_SRCS +set(kdenlive_render_SRCS kdenlive_render.cpp renderjob.cpp ) kde4_add_executable(kdenlive_render ${kdenlive_render_SRCS}) -target_link_libraries(kdenlive_render - ${QT_QTCORE_LIBRARY} - ${QT_QTDBUS_LIBRARY} +include_directories( + ${QT_INCLUDES} ) -install(TARGETS kdenlive_render DESTINATION ${BIN_INSTALL_DIR}) +include(${QT_USE_FILE}) + +target_link_libraries(kdenlive_render + ${QT_LIBRARIES} +) +install(TARGETS kdenlive_render DESTINATION ${BIN_INSTALL_DIR}) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cb73bbd6..f5b877eb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,5 +1,5 @@ find_package(OpenGL REQUIRED) -find_package(Qt4 ${QT_MIN_VERSION} REQUIRED QtOpenGL QtScript) +find_package(Qt4 ${QT_MIN_VERSION} REQUIRED QtGui QtOpenGL QtScript) if(APPLE) find_package(SDL REQUIRED) endif(APPLE) @@ -281,21 +281,26 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --std=c99") add_definitions(${KDE4_DEFINITIONS}) include_directories( + ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES} # Adds Qt include directories too. ${LIBMLT_INCLUDE_DIR} ${LIBMLTPLUS_INCLUDE_DIR} - ${CMAKE_BINARY_DIR} - ${CMAKE_CURRENT_BINARY_DIR} ) # Adds Qt definitions and include directories, and sets QT_LIBRARIES according # to the components requested in find_package(). -include(UseQt4) +include(${QT_USE_FILE}) + +if(${KDE_VERSION} VERSION_LESS 4.3.80) + set(KDE4_KNEWSTUFF_LIBS ${KDE4_KNEWSTUFF2_LIBS}) +else(${KDE_VERSION} VERSION_LESS 4.3.80) + set(KDE4_KNEWSTUFF_LIBS ${KDE4_KNEWSTUFF3_LIBS}) +endif(${KDE_VERSION} VERSION_LESS 4.3.80) target_link_libraries(kdenlive ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} - ${KDE4_KNEWSTUFF3_LIBS} + ${KDE4_KNEWSTUFF_LIBS} ${KDE4_KNOTIFYCONFIG_LIBRARY} ${KDE4_KROSSUI_LIBS} ${QT_LIBRARIES} diff --git a/src/archivewidget.cpp b/src/archivewidget.cpp index 363781df..db2b9e8d 100644 --- a/src/archivewidget.cpp +++ b/src/archivewidget.cpp @@ -140,9 +140,7 @@ ArchiveWidget::ArchiveWidget(QString projectName, QDomDocument doc, QList = 0x040500 allFonts.removeDuplicates(); -#endif //TODO: fonts diff --git a/src/customtrackview.cpp b/src/customtrackview.cpp index 35b11c21..f5e7d91a 100644 --- a/src/customtrackview.cpp +++ b/src/customtrackview.cpp @@ -6420,9 +6420,7 @@ QStringList CustomTrackView::extractTransitionsLumas() if (!luma.isEmpty()) urls << KUrl(luma).path(); } } -#if QT_VERSION >= 0x040500 urls.removeDuplicates(); -#endif return urls; } diff --git a/src/kdenlivesettingsdialog.cpp b/src/kdenlivesettingsdialog.cpp index 520501e5..34297068 100644 --- a/src/kdenlivesettingsdialog.cpp +++ b/src/kdenlivesettingsdialog.cpp @@ -713,7 +713,6 @@ void KdenliveSettingsDialog::updateSettings() #endif KConfigDialog::settingsChangedSlot(); - //KConfigDialog::updateSettings(); if (resetProfile) emit doResetProfile(); } diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 5982d302..d9f6c403 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -92,8 +92,14 @@ #include #include #include +#if KDE_IS_VERSION(4,3,80) #include #include +#else +#include +#include +#define KNS3 KNS +#endif #include #include #include @@ -239,7 +245,9 @@ MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, const QString & connect(m_notesWidget, SIGNAL(seekProject(int)), m_projectMonitor->render, SLOT(seekToFrame(int))); m_notesWidget->setTabChangesFocus(true); +#if KDE_IS_VERSION(4,4,0) m_notesWidget->setClickMessage(i18n("Enter your project notes here ...")); +#endif m_notesDock->setWidget(m_notesWidget); addDockWidget(Qt::TopDockWidgetArea, m_notesDock); @@ -3661,6 +3669,7 @@ void MainWindow::slotResizeItemEnd() int MainWindow::getNewStuff(const QString &configFile) { KNS3::Entry::List entries; +#if KDE_IS_VERSION(4,3,80) KNS3::DownloadDialog dialog(configFile); dialog.exec(); entries = dialog.changedEntries(); @@ -3668,6 +3677,15 @@ int MainWindow::getNewStuff(const QString &configFile) if (entry.status() == KNS3::Entry::Installed) kDebug() << "// Installed files: " << entry.installedFiles(); } +#else + KNS::Engine engine(0); + if (engine.init(configFile)) + entries = engine.downloadDialogModal(this); + foreach(KNS::Entry * entry, entries) { + if (entry->status() == KNS::Entry::Installed) + kDebug() << "// Installed files: " << entry->installedFiles(); + } +#endif return entries.size(); } diff --git a/src/projectsettings.cpp b/src/projectsettings.cpp index bce75275..0504ba82 100644 --- a/src/projectsettings.cpp +++ b/src/projectsettings.cpp @@ -298,9 +298,7 @@ void ProjectSettings::slotUpdateFiles(bool cacheOnly) usedSize += clip->fileSize(); } } -#if QT_VERSION >= 0x040500 allFonts.removeDuplicates(); -#endif // Hide unused categories for (int i = 0; i < files_list->topLevelItemCount(); i++) { if (files_list->topLevelItem(i)->childCount() == 0) { diff --git a/src/recmonitor.cpp b/src/recmonitor.cpp index 3e7d4323..9ec0c442 100644 --- a/src/recmonitor.cpp +++ b/src/recmonitor.cpp @@ -35,9 +35,7 @@ #include #include #include - #include - #include #include #include diff --git a/src/recmonitor.h b/src/recmonitor.h index ec25a73c..86cb0d97 100644 --- a/src/recmonitor.h +++ b/src/recmonitor.h @@ -40,7 +40,6 @@ #include #include #include - #include class MonitorManager;