From a9295ac42ebb309a9a71f6cb0ce7fd4125c864ab Mon Sep 17 00:00:00 2001 From: Alberto Villa Date: Tue, 12 Jul 2011 21:33:55 +0000 Subject: [PATCH] - Hopefully fix build on GNU/kFreeBSD. There might still be a problem, waiting for tests by Patrick. This fix is just a simple hack. The nice solution will come with the refactoring branch. svn path=/trunk/kdenlive/; revision=5790 --- src/CMakeLists.txt | 16 ++++++++++------ src/kdenlivesettingsdialog.cpp | 4 ++-- src/stopmotion/stopmotion.cpp | 6 +++--- src/wizard.cpp | 4 ++-- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 07b1f344..4664e1c9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -279,24 +279,28 @@ set(kdenlive_SRCS add_definitions(${KDE4_DEFINITIONS}) -if(APPLE OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "NetBSD" OR NO_JOGSHUTTLE) +if(CMAKE_SYSTEM_NAME STREQUAL "GNU/kFreeBSD") + add_definitions(-DQ_OS_KFREEBSD) +endif(CMAKE_SYSTEM_NAME STREQUAL "GNU/kFreeBSD") + +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 NO_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 NO_JOGSHUTTLE) +endif(APPLE OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "NetBSD" OR CMAKE_SYSTEM_NAME STREQUAL "GNU/kFreeBSD" OR NO_JOGSHUTTLE) if(APPLE OR OPENGL_FOUND) add_definitions(-DUSE_OPEN_GL) set(kdenlive_SRCS videoglwidget.cpp ${kdenlive_SRCS}) endif(APPLE OR OPENGL_FOUND) -if(NOT APPLE AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") +if(NOT APPLE AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND NOT CMAKE_SYSTEM_NAME STREQUAL "GNU/kFreeBSD") set(kdenlive_SRCS ${kdenlive_SRCS} v4l/v4lcapture.cpp v4l/src.c ) -endif(NOT APPLE AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") +endif(NOT APPLE AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND NOT CMAKE_SYSTEM_NAME STREQUAL "GNU/kFreeBSD") if(QJSON_FOUND) set(kdenlive_SRCS @@ -358,4 +362,4 @@ install(FILES kdenliveui.rc kdenlive.notifyrc DESTINATION ${DATA_INSTALL_DIR}/kd install(FILES kdenlivesettings.kcfg DESTINATION ${KCFG_INSTALL_DIR}) install(FILES kdenlive.desktop DESTINATION ${XDG_APPS_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}) \ No newline at end of file +install(FILES kdenlive_titles.knsrc kdenlive_wipes.knsrc kdenlive_renderprofiles.knsrc kdenlive_projectprofiles.knsrc kdenlivetranscodingrc DESTINATION ${CONFIG_INSTALL_DIR}) diff --git a/src/kdenlivesettingsdialog.cpp b/src/kdenlivesettingsdialog.cpp index 3e8ee9bc..b13a82be 100644 --- a/src/kdenlivesettingsdialog.cpp +++ b/src/kdenlivesettingsdialog.cpp @@ -19,7 +19,7 @@ #include "kdenlivesettingsdialog.h" #include "profilesdialog.h" -#if !defined(Q_OS_FREEBSD) +#if !defined(Q_OS_FREEBSD) && !defined(Q_OS_KFREEBSD) #include "v4l/v4lcapture.h" #endif #include "blackmagic/devices.h" @@ -97,7 +97,7 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(const QMap& map QWidget *p4 = new QWidget; m_configCapture.setupUi(p4); -#if !defined(Q_WS_MAC) && !defined(Q_OS_FREEBSD) +#if !defined(Q_WS_MAC) && !defined(Q_OS_FREEBSD) && !defined(Q_OS_KFREEBSD) // Video 4 Linux device detection for (int i = 0; i < 10; i++) { diff --git a/src/stopmotion/stopmotion.cpp b/src/stopmotion/stopmotion.cpp index e6bf6afb..136273cd 100644 --- a/src/stopmotion/stopmotion.cpp +++ b/src/stopmotion/stopmotion.cpp @@ -17,7 +17,7 @@ #include "stopmotion.h" #include "../blackmagic/devices.h" -#if !defined(Q_OS_FREEBSD) +#if !defined(Q_OS_FREEBSD) && !defined(Q_OS_KFREEBSD) #include "../v4l/v4lcapture.h" #endif #include "../slideshowclip.h" @@ -257,7 +257,7 @@ StopmotionWidget::StopmotionWidget(MonitorManager *manager, KUrl projectFolder, // Found a BlackMagic device } if (QFile::exists(KdenliveSettings::video4vdevice())) { -#if !defined(Q_WS_MAC) && !defined(Q_OS_FREEBSD) +#if !defined(Q_WS_MAC) && !defined(Q_OS_FREEBSD) && !defined(Q_OS_KFREEBSD) // Video 4 Linux device detection for (int i = 0; i < 10; i++) { QString path = "/dev/video" + QString::number(i); @@ -400,7 +400,7 @@ void StopmotionWidget::slotUpdateDeviceHandler() } m_layout->removeWidget(m_frame_preview); if (data == "v4l") { -#if !defined(Q_WS_MAC) && !defined(Q_OS_FREEBSD) +#if !defined(Q_WS_MAC) && !defined(Q_OS_FREEBSD) && !defined(Q_OS_KFREEBSD) 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 diff --git a/src/wizard.cpp b/src/wizard.cpp index 5612b27d..41509337 100644 --- a/src/wizard.cpp +++ b/src/wizard.cpp @@ -20,7 +20,7 @@ #include "wizard.h" #include "kdenlivesettings.h" #include "profilesdialog.h" -#if !defined(Q_OS_FREEBSD) +#if !defined(Q_OS_FREEBSD) && !defined(Q_OS_KFREEBSD) #include "v4l/v4lcapture.h" #endif #include "kdenlive-config.h" @@ -158,7 +158,7 @@ Wizard::Wizard(bool upgrade, QWidget *parent) : void Wizard::slotDetectWebcam() { -#if !defined(Q_WS_MAC) && !defined(Q_OS_FREEBSD) +#if !defined(Q_WS_MAC) && !defined(Q_OS_FREEBSD) && !defined(Q_OS_KFREEBSD) m_capture.v4l_devices->blockSignals(true); m_capture.v4l_devices->clear(); -- 2.39.2