diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index 16ce43556..3fa2e554c 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -16,16 +16,12 @@
set(OLIVE_SOURCES
${OLIVE_SOURCES}
- clamp.h
core.h
core.cpp
- lerp.h
main.cpp
- rational.h
- rational.cpp
- qobjectlistcast.h
)
+add_subdirectory(common)
add_subdirectory(decoder)
add_subdirectory(node)
add_subdirectory(panel)
diff --git a/app/common/CMakeLists.txt b/app/common/CMakeLists.txt
new file mode 100644
index 000000000..6c5ca6ef6
--- /dev/null
+++ b/app/common/CMakeLists.txt
@@ -0,0 +1,25 @@
+# Olive - Non-Linear Video Editor
+# Copyright (C) 2019 Olive Team
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+set(OLIVE_SOURCES
+ ${OLIVE_SOURCES}
+ common/clamp.h
+ common/lerp.h
+ common/rational.h
+ common/rational.cpp
+ common/qobjectlistcast.h
+ PARENT_SCOPE
+)
diff --git a/app/clamp.h b/app/common/clamp.h
similarity index 100%
rename from app/clamp.h
rename to app/common/clamp.h
diff --git a/app/lerp.h b/app/common/lerp.h
similarity index 100%
rename from app/lerp.h
rename to app/common/lerp.h
diff --git a/app/qobjectlistcast.h b/app/common/qobjectlistcast.h
similarity index 100%
rename from app/qobjectlistcast.h
rename to app/common/qobjectlistcast.h
diff --git a/app/rational.cpp b/app/common/rational.cpp
similarity index 100%
rename from app/rational.cpp
rename to app/common/rational.cpp
diff --git a/app/rational.h b/app/common/rational.h
similarity index 100%
rename from app/rational.h
rename to app/common/rational.h
diff --git a/app/decoder/decoder.h b/app/decoder/decoder.h
index 6b4dd381b..6180f0539 100644
--- a/app/decoder/decoder.h
+++ b/app/decoder/decoder.h
@@ -24,7 +24,7 @@
#include
#include
-#include "rational.h"
+#include "common/rational.h"
#include "project/item/footage/footage.h"
#include "decoder/frame.h"
diff --git a/app/decoder/frame.h b/app/decoder/frame.h
index e07cd0621..1fde58258 100644
--- a/app/decoder/frame.h
+++ b/app/decoder/frame.h
@@ -27,7 +27,7 @@ extern "C" {
#include
-#include "rational.h"
+#include "common/rational.h"
/**
* @brief Abstraction from AVFrame. Currently a simple AVFrame wrapper.
diff --git a/app/node/graph.cpp b/app/node/graph.cpp
index 3ea32b0b9..7f1bb660c 100644
--- a/app/node/graph.cpp
+++ b/app/node/graph.cpp
@@ -20,7 +20,7 @@
#include "graph.h"
-#include "qobjectlistcast.h"
+#include "common/qobjectlistcast.h"
NodeGraph::NodeGraph()
{
diff --git a/app/node/keyframe.h b/app/node/keyframe.h
index 127fd7fa5..e482bccfd 100644
--- a/app/node/keyframe.h
+++ b/app/node/keyframe.h
@@ -23,7 +23,7 @@
#include
-#include "rational.h"
+#include "common/rational.h"
class NodeKeyframe
{
diff --git a/app/node/node.cpp b/app/node/node.cpp
index e079616df..6431edc9a 100644
--- a/app/node/node.cpp
+++ b/app/node/node.cpp
@@ -20,7 +20,7 @@
#include "node.h"
-#include "qobjectlistcast.h"
+#include "common/qobjectlistcast.h"
Node::Node(QObject *parent) :
QObject(parent)
diff --git a/app/node/node.h b/app/node/node.h
index ade4bfe22..f159549b9 100644
--- a/app/node/node.h
+++ b/app/node/node.h
@@ -23,9 +23,9 @@
#include
+#include "common/rational.h"
#include "node/input.h"
#include "node/output.h"
-#include "rational.h"
class Node : public QObject
{
diff --git a/app/node/param.h b/app/node/param.h
index b83c916d5..4f4fb8ac0 100644
--- a/app/node/param.h
+++ b/app/node/param.h
@@ -24,8 +24,8 @@
#include
#include
+#include "common/rational.h"
#include "node/edge.h"
-#include "rational.h"
class Node;
diff --git a/app/project/item/footage/audiostream.h b/app/project/item/footage/audiostream.h
index fec4dd438..92e826301 100644
--- a/app/project/item/footage/audiostream.h
+++ b/app/project/item/footage/audiostream.h
@@ -25,7 +25,7 @@ extern "C" {
#include
}
-#include "rational.h"
+#include "common/rational.h"
#include "stream.h"
/**
diff --git a/app/project/item/footage/footage.h b/app/project/item/footage/footage.h
index d9790ab0c..264ed5621 100644
--- a/app/project/item/footage/footage.h
+++ b/app/project/item/footage/footage.h
@@ -24,10 +24,10 @@
#include
#include
+#include "common/rational.h"
#include "project/item/item.h"
#include "project/item/footage/audiostream.h"
#include "project/item/footage/videostream.h"
-#include "rational.h"
/**
* @brief A reference to an external media file with metadata in a project structure
diff --git a/app/project/item/footage/stream.h b/app/project/item/footage/stream.h
index f668f71e1..099703a45 100644
--- a/app/project/item/footage/stream.h
+++ b/app/project/item/footage/stream.h
@@ -21,7 +21,7 @@
#ifndef STREAM_H
#define STREAM_H
-#include "rational.h"
+#include "common/rational.h"
class Footage;
diff --git a/app/project/item/footage/videostream.h b/app/project/item/footage/videostream.h
index a45102bdf..21eabcd3f 100644
--- a/app/project/item/footage/videostream.h
+++ b/app/project/item/footage/videostream.h
@@ -21,7 +21,7 @@
#ifndef VIDEOSTREAM_H
#define VIDEOSTREAM_H
-#include "rational.h"
+#include "common/rational.h"
#include "stream.h"
/**
diff --git a/app/project/item/sequence/sequence.h b/app/project/item/sequence/sequence.h
index 9738a8964..249c69318 100644
--- a/app/project/item/sequence/sequence.h
+++ b/app/project/item/sequence/sequence.h
@@ -21,9 +21,9 @@
#ifndef SEQUENCE_H
#define SEQUENCE_H
+#include "common/rational.h"
#include "node/graph.h"
#include "project/item/item.h"
-#include "rational.h"
class Sequence : public Item, public NodeGraph
{
diff --git a/app/widget/nodeview/nodeviewedge.cpp b/app/widget/nodeview/nodeviewedge.cpp
index ac4994571..793b77513 100644
--- a/app/widget/nodeview/nodeviewedge.cpp
+++ b/app/widget/nodeview/nodeviewedge.cpp
@@ -22,8 +22,8 @@
#include
-#include "clamp.h"
-#include "lerp.h"
+#include "common/clamp.h"
+#include "common/lerp.h"
#include "nodeview.h"
#include "nodeviewitem.h"
diff --git a/app/widget/viewer/viewer.h b/app/widget/viewer/viewer.h
index f45425408..170547937 100644
--- a/app/widget/viewer/viewer.h
+++ b/app/widget/viewer/viewer.h
@@ -25,7 +25,7 @@
#include
#include
-#include "rational.h"
+#include "common/rational.h"
#include "viewerglwidget.h"
#include "widget/playbackcontrols/playbackcontrols.h"