Commit 634e5785 authored by Alberto Villa's avatar Alberto Villa

Reorganize and cleanup build structure

src/CMakeLists.txt gets splitted in several files; #include's are now
relative to src/ (or, when in one of its direct sub directories, on
it).
parent 3bdc55dc
macro_optional_find_package(Nepomuk)
macro_optional_find_package(QJSON)
add_subdirectory(audioscopes)
add_subdirectory(beziercurve)
add_subdirectory(blackmagic)
add_subdirectory(colorcorrection)
add_subdirectory(colorscopes)
add_subdirectory(commands)
add_subdirectory(databackup)
add_subdirectory(kiss_fft)
add_subdirectory(mimetypes)
add_subdirectory(onmonitoritems)
add_subdirectory(rotoscoping)
add_subdirectory(widgets)
add_subdirectory(databackup)
add_subdirectory(commands)
add_subdirectory(simplekeyframes)
add_subdirectory(stopmotion)
macro_optional_find_package(Nepomuk)
macro_optional_find_package(QJSON)
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")
endif(QJSON_FOUND)
if(NOT APPLE AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND NOT CMAKE_SYSTEM_NAME STREQUAL "GNU/kFreeBSD")
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}
......@@ -18,32 +35,16 @@ include_directories(
${LIBMLT_INCLUDE_DIR}
${LIBMLTPLUS_INCLUDE_DIR}
${QDBUS_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/src/audioscopes
${CMAKE_SOURCE_DIR}/src/beziercurve
${CMAKE_SOURCE_DIR}/src/colorcorrection
${CMAKE_SOURCE_DIR}/src/kiss_fft
${CMAKE_SOURCE_DIR}/src/onmonitoritems
${CMAKE_SOURCE_DIR}/src/onmonitoritems/rotoscoping
${CMAKE_SOURCE_DIR}/src/widgets
)
if(Nepomuk_FOUND)
include_directories(NEPOMUK_INCLUDES)
set(optional_libs ${NEPOMUK_LIBRARIES})
set(optional_libs ${optional_libs} ${NEPOMUK_LIBRARIES})
add_definitions(-DNEPOMUK)
endif(Nepomuk_FOUND)
if(QJSON_FOUND)
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")
endif(QJSON_FOUND)
if(Q_WS_X11)
include_directories(${X11_Xlib_INCLUDE_PATH})
endif(Q_WS_X11)
......@@ -203,44 +204,17 @@ set(kdenlive_SRCS
timecodedisplay.cpp
tracksconfigdialog.cpp
abstractscopewidget.cpp
audioscopes/abstractaudioscopewidget.cpp
audioscopes/audiospectrum.cpp
audioscopes/spectrogram.cpp
audioscopes/ffttools.cpp
colorscopes/abstractgfxscopewidget.cpp
colorscopes/histogram.cpp
colorscopes/rgbparade.cpp
colorscopes/vectorscope.cpp
colorscopes/waveform.cpp
colorplaneexport.cpp
colortools.cpp
colorcorrection/histogramgenerator.cpp
colorcorrection/rgbparadegenerator.cpp
colorcorrection/vectorscopegenerator.cpp
colorcorrection/waveformgenerator.cpp
colorpickerwidget.cpp
choosecolorwidget.cpp
monitorscene.cpp
geometrywidget.cpp
doubleparameterwidget.cpp
audiosignal.cpp
blackmagic/include/DeckLinkAPIDispatch.cpp
stopmotion/stopmotion.cpp
blackmagic/devices.cpp
onmonitoritems/onmonitorrectitem.cpp
onmonitoritems/onmonitorcornersitem.cpp
cornerswidget.cpp
kiss_fft/_kiss_fft_guts.h
kiss_fft/kiss_fft.c
kiss_fft/tools/kiss_fftr.c
beziercurve/beziersplineeditor.cpp
beziercurve/beziersplinewidget.cpp
beziercurve/bpoint.cpp
beziercurve/cubicbezierspline.cpp
dragvalue.cpp
monitoreditwidget.cpp
simplekeyframes/simpletimelinewidget.cpp
simplekeyframes/simplekeyframewidget.cpp
noteswidget.cpp
archivewidget.cpp
mltdevicecapture.cpp
......@@ -265,24 +239,6 @@ if(APPLE OR OPENGL_FOUND)
set(kdenlive_SRCS videoglwidget.cpp ${kdenlive_SRCS})
endif(APPLE OR OPENGL_FOUND)
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" AND NOT CMAKE_SYSTEM_NAME STREQUAL "GNU/kFreeBSD")
if(QJSON_FOUND)
set(kdenlive_SRCS
${kdenlive_SRCS}
onmonitoritems/rotoscoping/bpointitem.cpp
onmonitoritems/rotoscoping/nearestpoint.cpp
onmonitoritems/rotoscoping/splineitem.cpp
rotoscoping/rotowidget.cpp
)
endif(QJSON_FOUND)
# Add libdl
find_library(DL_LIB NAMES ${CMAKE_DL_LIBS})
message(STATUS "using dl library: ${DL_LIB}")
......
......@@ -8,12 +8,11 @@
* (at your option) any later version. *
***************************************************************************/
#include "qtconcurrentrun.h"
#include "abstractscopewidget.h"
#include "renderer.h"
#include "monitor.h"
#include <QtConcurrentRun>
#include <QFuture>
#include <QColor>
#include <QMenu>
......
set(kdenlive_SRCS
${kdenlive_SRCS}
audioscopes/abstractaudioscopewidget.cpp
audioscopes/audiospectrum.cpp
audioscopes/ffttools.cpp
audioscopes/spectrogram.cpp
PARENT_SCOPE
)
......@@ -8,12 +8,11 @@
* (at your option) any later version. *
***************************************************************************/
#include "qtconcurrentrun.h"
#include "abstractaudioscopewidget.h"
#include "renderer.h"
#include "monitor.h"
#include <QtConcurrentRun>
#include <QFuture>
#include <QColor>
#include <QMenu>
......
......@@ -12,7 +12,7 @@
#include "audiospectrum.h"
#include "ffttools.h"
#include "tools/kiss_fftr.h"
#include "kiss_fft/tools/kiss_fftr.h"
#include <QMenu>
#include <QPainter>
......
......@@ -29,7 +29,7 @@
#include "abstractaudioscopewidget.h"
#include "ui_audiospectrum_ui.h"
#include "tools/kiss_fftr.h"
#include "kiss_fft/tools/kiss_fftr.h"
#include "ffttools.h"
class AudioSpectrum_UI;
......
......@@ -13,7 +13,7 @@
#include <QVector>
#include <QHash>
#include <tools/kiss_fftr.h>
#include "kiss_fft/tools/kiss_fftr.h"
class FFTTools
{
......
......@@ -18,7 +18,6 @@
***************************************************************************/
#include "audiosignal.h"
#include "math.h"
#include <KLocale>
......@@ -29,6 +28,7 @@
#include <QDebug>
#include <QList>
#include <math.h>
AudioSignal::AudioSignal(QWidget *parent): QWidget(parent)
{
......
set(kdenlive_SRCS
${kdenlive_SRCS}
beziercurve/beziersplineeditor.cpp
beziercurve/beziersplinewidget.cpp
beziercurve/bpoint.cpp
beziercurve/cubicbezierspline.cpp
PARENT_SCOPE
)
set(kdenlive_SRCS
${kdenlive_SRCS}
blackmagic/devices.cpp
blackmagic/include/DeckLinkAPIDispatch.cpp
PARENT_SCOPE
)
set(kdenlive_SRCS
${kdenlive_SRCS}
colorcorrection/histogramgenerator.cpp
colorcorrection/rgbparadegenerator.cpp
colorcorrection/vectorscopegenerator.cpp
colorcorrection/waveformgenerator.cpp
PARENT_SCOPE
)
set(kdenlive_SRCS
${kdenlive_SRCS}
colorscopes/abstractgfxscopewidget.cpp
colorscopes/histogram.cpp
colorscopes/rgbparade.cpp
colorscopes/vectorscope.cpp
colorscopes/waveform.cpp
PARENT_SCOPE
)
......@@ -8,12 +8,11 @@
* (at your option) any later version. *
***************************************************************************/
#include "qtconcurrentrun.h"
#include "abstractgfxscopewidget.h"
#include "renderer.h"
#include "monitormanager.h"
#include <QtConcurrentRun>
#include <QFuture>
#include <QColor>
#include <QMenu>
......
......@@ -10,7 +10,7 @@
#include <QMenu>
#include <QTime>
#include "histogramgenerator.h"
#include "colorcorrection/histogramgenerator.h"
#include "histogram.h"
#include "renderer.h"
......
......@@ -14,7 +14,7 @@
#include <QTime>
#include "renderer.h"
#include "rgbparade.h"
#include "rgbparadegenerator.h"
#include "colorcorrection/rgbparadegenerator.h"
RGBParade::RGBParade(MonitorManager *manager, QWidget *parent) :
AbstractGfxScopeWidget(manager, true, parent)
......
......@@ -22,7 +22,7 @@
#include "colortools.h"
#include "renderer.h"
#include "vectorscope.h"
#include "vectorscopegenerator.h"
#include "colorcorrection/vectorscopegenerator.h"
const float P75 = .75;
const unsigned char DEFAULT_Y = 255;
......
......@@ -19,7 +19,7 @@
#include "renderer.h"
#include "waveform.h"
#include "waveformgenerator.h"
#include "colorcorrection/waveformgenerator.h"
const QSize Waveform::m_textWidth(35,0);
......
......@@ -18,7 +18,7 @@
***************************************************************************/
#include "commands/addclipcommand.h"
#include "addclipcommand.h"
#include "kdenlivedoc.h"
#include <KLocale>
......
......@@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include "commands/addclipcutcommand.h"
#include "addclipcutcommand.h"
#include "projectlist.h"
#include <KLocale>
......
......@@ -18,7 +18,7 @@
***************************************************************************/
#include "commands/addeffectcommand.h"
#include "addeffectcommand.h"
#include "customtrackview.h"
#include <KLocale>
......
......@@ -18,7 +18,7 @@
***************************************************************************/
#include "commands/addfoldercommand.h"
#include "addfoldercommand.h"
#include "projectlist.h"
#include <KLocale>
......
......@@ -16,7 +16,7 @@
***************************************************************************/
#include "commands/addmarkercommand.h"
#include "addmarkercommand.h"
#include "customtrackview.h"
#include <KLocale>
......
......@@ -18,7 +18,7 @@
***************************************************************************/
#include "commands/addtimelineclipcommand.h"
#include "addtimelineclipcommand.h"
#include "customtrackview.h"
#include <KLocale>
......
......@@ -18,7 +18,7 @@
***************************************************************************/
#include "commands/addtrackcommand.h"
#include "addtrackcommand.h"
#include "customtrackview.h"
#include <KLocale>
......
......@@ -16,7 +16,7 @@
***************************************************************************/
#include "commands/addtransitioncommand.h"
#include "addtransitioncommand.h"
#include "customtrackview.h"
#include <KLocale>
......
......@@ -18,7 +18,7 @@
***************************************************************************/
#include "commands/changecliptypecommand.h"
#include "changecliptypecommand.h"
#include "customtrackview.h"
#include <KLocale>
......
......@@ -18,7 +18,7 @@
***************************************************************************/
#include "commands/changespeedcommand.h"
#include "changespeedcommand.h"
#include "customtrackview.h"
#include <KLocale>
......
......@@ -18,7 +18,7 @@
***************************************************************************/
#include "commands/configtrackscommand.h"
#include "configtrackscommand.h"
#include "customtrackview.h"
......
......@@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include "commands/editclipcommand.h"
#include "editclipcommand.h"
#include "projectlist.h"
#include <KLocale>
......
......@@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include "commands/editclipcutcommand.h"
#include "editclipcutcommand.h"
#include "projectlist.h"
#include <KLocale>
......
......@@ -18,7 +18,7 @@
***************************************************************************/
#include "commands/editeffectcommand.h"
#include "editeffectcommand.h"
#include "customtrackview.h"
#include <KLocale>
......
......@@ -18,7 +18,7 @@
***************************************************************************/
#include "commands/editfoldercommand.h"
#include "editfoldercommand.h"
#include "projectlist.h"
#include <KLocale>
......
......@@ -16,7 +16,7 @@
***************************************************************************/
#include "commands/editguidecommand.h"
#include "editguidecommand.h"
#include "customtrackview.h"
#include <KLocale>
......
......@@ -16,7 +16,7 @@
***************************************************************************/
#include "commands/editkeyframecommand.h"
#include "editkeyframecommand.h"
#include "customtrackview.h"
#include <KLocale>
......
......@@ -15,7 +15,7 @@
* *
***************************************************************************/
#include "commands/edittransitioncommand.h"
#include "edittransitioncommand.h"
#include "customtrackview.h"
#include <KLocale>
......
......@@ -18,7 +18,7 @@
***************************************************************************/
#include "commands/groupclipscommand.h"
#include "groupclipscommand.h"
#include "customtrackview.h"
#include <KLocale>
......
......@@ -18,7 +18,7 @@
***************************************************************************/
#include "commands/insertspacecommand.h"
#include "insertspacecommand.h"
#include "customtrackview.h"
#include <KLocale>
......
......@@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include "commands/locktrackcommand.h"
#include "locktrackcommand.h"
#include "customtrackview.h"
#include <KLocale>
......
......@@ -18,7 +18,7 @@
***************************************************************************/
#include "commands/moveclipcommand.h"
#include "moveclipcommand.h"
#include "customtrackview.h"
#include <KLocale>
......
......@@ -18,7 +18,7 @@
***************************************************************************/
#include "commands/moveeffectcommand.h"
#include "moveeffectcommand.h"
#include "customtrackview.h"
#include <KLocale>
......
......@@ -18,7 +18,7 @@
***************************************************************************/
#include "commands/movegroupcommand.h"
#include "movegroupcommand.h"
#include "customtrackview.h"
#include <KLocale>
......
......@@ -15,7 +15,7 @@
* *
***************************************************************************/
#include "commands/movetransitioncommand.h"
#include "movetransitioncommand.h"
#include "customtrackview.h"
#include <KLocale>
......
......@@ -18,7 +18,7 @@
***************************************************************************/
#include "commands/razorclipcommand.h"
#include "razorclipcommand.h"
#include "customtrackview.h"
#include <KLocale>
......
......@@ -18,7 +18,7 @@
***************************************************************************/
#include "commands/razorgroupcommand.h"
#include "razorgroupcommand.h"
#include "customtrackview.h"
RazorGroupCommand::RazorGroupCommand(CustomTrackView *view, QList <ItemInfo> clips1, QList <ItemInfo> transitions1, QList <ItemInfo> clipsCut, QList <ItemInfo> transitionsCut, QList <ItemInfo> clips2, QList <ItemInfo> transitions2, GenTime cutPos, QUndoCommand * parent) :
......
......@@ -18,7 +18,7 @@
***************************************************************************/
#include "commands/rebuildgroupcommand.h"
#include "rebuildgroupcommand.h"
#include "customtrackview.h"
RebuildGroupCommand::RebuildGroupCommand(CustomTrackView* view, int childTrack, GenTime childPos, QUndoCommand* parent) :
......
......@@ -18,7 +18,7 @@
***************************************************************************/
#include "commands/resizeclipcommand.h"
#include "resizeclipcommand.h"
#include "customtrackview.h"
#include <KLocale>
......
......@@ -18,7 +18,7 @@
***************************************************************************/
#include "commands/splitaudiocommand.h"
#include "splitaudiocommand.h"
#include "customtrackview.h"
#include <KLocale>
......
add_subdirectory(tools)
set(kdenlive_SRCS
${kdenlive_SRCS}
kiss_fft/_kiss_fft_guts.h
kiss_fft/kiss_fft.c
kiss_fft/tools/kiss_fftr.c
PARENT_SCOPE
)
......@@ -18,7 +18,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
#include <string.h>
#include <unistd.h>
#include "kiss_fft.h"
#include "../kiss_fft.h"
#include "kiss_fftndr.h"
static
......
#ifndef KFC_H
#define KFC_H
#include "kiss_fft.h"
#include "../kiss_fft.h"
#ifdef __cplusplus
extern "C" {
......
......@@ -12,7 +12,7 @@ Redistribution and use in source and binary forms, with or without modification,
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "_kiss_fft_guts.h"
#include "../_kiss_fft_guts.h"
/*
......
......@@ -15,7 +15,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
*/
#include "kiss_fftnd.h"
#include "_kiss_fft_guts.h"
#include "../_kiss_fft_guts.h"
struct kiss_fftnd_state{
int dimprod; /* dimsum would be mighty tasty right now */
......
#ifndef KISS_FFTND_H
#define KISS_FFTND_H
#include "kiss_fft.h"
#include "../kiss_fft.h"
#ifdef __cplusplus
extern "C" {
......
......@@ -13,7 +13,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
*/
#include "kiss_fftndr.h"
#include "_kiss_fft_guts.h"
#include "../_kiss_fft_guts.h"
#define MAX(x,y) ( ( (x)<(y) )?(y):(x) )
struct kiss_fftndr_state
......
#ifndef KISS_NDR_H
#define KISS_NDR_H
#include "kiss_fft.h"
#include "../kiss_fft.h"
#include "kiss_fftr.h"
#include "kiss_fftnd.h"
......
......@@ -13,7 +13,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
*/
#include "kiss_fftr.h"
#include "_kiss_fft_guts.h"
#include "../_kiss_fft_guts.h"
struct kiss_fftr_state{
kiss_fft_cfg substate;
......
#ifndef KISS_FTR_H
#define KISS_FTR_H
#include "kiss_fft.h"
#include "../kiss_fft.h"
#ifdef __cplusplus
extern "C" {
#endif
......
......@@ -19,7 +19,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
#include <unistd.h>
#include <png.h>
#include "kiss_fft.h"
#include "../kiss_fft.h"
#include "kiss_fftr.h"
int nfft=1024;
......
......@@ -59,8 +59,8 @@
#include "colorscopes/waveform.h"
#include "colorscopes/rgbparade.h"
#include "colorscopes/histogram.h"
#include "audiospectrum.h"
#include "spectrogram.h"
#include "audioscopes/audiospectrum.h"
#include "audioscopes/spectrogram.h"
#include "archivewidget.h"
#include "databackup/backupwidget.h"
......
......@@ -26,7 +26,8 @@
#include "gentime.h"
#include "definitions.h"
#include "abstractmonitor.h"
#include "mlt/framework/mlt_types.h"
#include <mlt/framework/mlt_types.h>
#include <QtConcurrentRun>
......