From 27384b44b7be7e78f27f8af2e37a457ad57bb73a Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (o)" <j.wuttke@fz-juelich.de>
Date: Mon, 6 Jul 2020 17:51:10 +0200
Subject: [PATCH] GUI/ba3d: include paths relative to CMAKE_SOURCE_DIR

---
 GUI/ba3d/CMakeLists.txt                                       | 3 +--
 GUI/ba3d/model/model.h                                        | 2 +-
 GUI/coregui/Views/RealSpaceWidgets/Particle3DContainer.cpp    | 2 +-
 GUI/coregui/Views/RealSpaceWidgets/RealSpaceBuilder.cpp       | 2 +-
 .../Views/RealSpaceWidgets/RealSpaceMesoCrystalUtils.cpp      | 2 +-
 GUI/coregui/Views/RealSpaceWidgets/RealSpaceModel.h           | 2 +-
 GUI/coregui/Views/RealSpaceWidgets/RealSpaceView.cpp          | 2 +-
 GUI/coregui/Views/RealSpaceWidgets/TransformTo3D.h            | 4 ++--
 dev-tools/sandboxes/realSpace/demo1/demo_model.cpp            | 2 +-
 dev-tools/sandboxes/realSpace/demo1/demo_model.h              | 4 ++--
 dev-tools/sandboxes/realSpace/demo1/lattice.h                 | 2 +-
 dev-tools/sandboxes/realSpace/demo1/main.cpp                  | 4 ++--
 dev-tools/sandboxes/realSpace/demo1/mainwindow.h              | 4 ++--
 dev-tools/sandboxes/realSpace/demo2/main.cpp                  | 4 ++--
 dev-tools/sandboxes/realSpace/demo2/mainwindow.h              | 4 ++--
 dev-tools/sandboxes/realSpace/demo2/modelLayers.cpp           | 2 +-
 dev-tools/sandboxes/realSpace/demo2/modelLayers.h             | 4 ++--
 dev-tools/sandboxes/realSpace/demo2/modelShowcase.h           | 4 ++--
 18 files changed, 26 insertions(+), 27 deletions(-)

diff --git a/GUI/ba3d/CMakeLists.txt b/GUI/ba3d/CMakeLists.txt
index 79ffd084e62..4f967bcc4f5 100644
--- a/GUI/ba3d/CMakeLists.txt
+++ b/GUI/ba3d/CMakeLists.txt
@@ -6,9 +6,8 @@ set(CMAKE_AUTORCC ON)
 qt5_add_resources(RC_SHADERS "shaders.qrc")
 
 add_library (${lib} STATIC ${source_files} ${RC_SHADERS})
-target_include_directories(${lib} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/..)
+target_include_directories(${lib} PUBLIC ${CMAKE_SOURCE_DIR})
 
 target_link_libraries (${lib} Qt5::Core Qt5::Widgets Qt5::OpenGL)
 
-set(${lib}_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/.. PARENT_SCOPE)
 set(${lib}_LIBRARY ${lib} PARENT_SCOPE)
diff --git a/GUI/ba3d/model/model.h b/GUI/ba3d/model/model.h
index 2e80fe3b037..8cbbb4e06f0 100644
--- a/GUI/ba3d/model/model.h
+++ b/GUI/ba3d/model/model.h
@@ -18,7 +18,7 @@
 #include "object.h"
 #include "particles.h"
 #include <QVector>
-#include <ba3d/view/camera.h>
+#include "GUI/ba3d/view/camera.h"
 
 namespace RealSpace
 {
diff --git a/GUI/coregui/Views/RealSpaceWidgets/Particle3DContainer.cpp b/GUI/coregui/Views/RealSpaceWidgets/Particle3DContainer.cpp
index 01e8904595c..acfd8cc4bd6 100644
--- a/GUI/coregui/Views/RealSpaceWidgets/Particle3DContainer.cpp
+++ b/GUI/coregui/Views/RealSpaceWidgets/Particle3DContainer.cpp
@@ -13,7 +13,7 @@
 // ************************************************************************** //
 
 #include "Particle3DContainer.h"
-#include <ba3d/model/particles.h>
+#include "GUI/ba3d/model/particles.h"
 
 // copy constructor
 Particle3DContainer::Particle3DContainer(const Particle3DContainer& other)
diff --git a/GUI/coregui/Views/RealSpaceWidgets/RealSpaceBuilder.cpp b/GUI/coregui/Views/RealSpaceWidgets/RealSpaceBuilder.cpp
index a40754d16c2..d5b0fe793d3 100644
--- a/GUI/coregui/Views/RealSpaceWidgets/RealSpaceBuilder.cpp
+++ b/GUI/coregui/Views/RealSpaceWidgets/RealSpaceBuilder.cpp
@@ -37,7 +37,7 @@
 #include "Units.h"
 #include "VectorItem.h"
 #include <QDebug>
-#include <ba3d/model/layer.h>
+#include "GUI/ba3d/model/layer.h"
 
 namespace
 {
diff --git a/GUI/coregui/Views/RealSpaceWidgets/RealSpaceMesoCrystalUtils.cpp b/GUI/coregui/Views/RealSpaceWidgets/RealSpaceMesoCrystalUtils.cpp
index 508dae0c3ef..6382382d3e0 100644
--- a/GUI/coregui/Views/RealSpaceWidgets/RealSpaceMesoCrystalUtils.cpp
+++ b/GUI/coregui/Views/RealSpaceWidgets/RealSpaceMesoCrystalUtils.cpp
@@ -30,7 +30,7 @@
 #include "RealSpaceBuilderUtils.h"
 #include "TransformTo3D.h"
 #include "Units.h"
-#include <ba3d/model/particles.h>
+#include "GUI/ba3d/model/particles.h"
 
 namespace
 {
diff --git a/GUI/coregui/Views/RealSpaceWidgets/RealSpaceModel.h b/GUI/coregui/Views/RealSpaceWidgets/RealSpaceModel.h
index cb70b3d526f..4e824e90b48 100644
--- a/GUI/coregui/Views/RealSpaceWidgets/RealSpaceModel.h
+++ b/GUI/coregui/Views/RealSpaceWidgets/RealSpaceModel.h
@@ -16,7 +16,7 @@
 #define REALSPACEMODEL_H
 
 #include "WinDllMacros.h"
-#include <ba3d/model/model.h>
+#include "GUI/ba3d/model/model.h"
 
 class RealSpaceModel : public RealSpace::Model
 {
diff --git a/GUI/coregui/Views/RealSpaceWidgets/RealSpaceView.cpp b/GUI/coregui/Views/RealSpaceWidgets/RealSpaceView.cpp
index 7e686722511..3d5a0dac012 100644
--- a/GUI/coregui/Views/RealSpaceWidgets/RealSpaceView.cpp
+++ b/GUI/coregui/Views/RealSpaceWidgets/RealSpaceView.cpp
@@ -15,7 +15,7 @@
 #include "RealSpaceView.h"
 #include "RealSpaceModel.h"
 #include <QVBoxLayout>
-#include <ba3d/widget.h>
+#include "GUI/ba3d/widget.h"
 
 RealSpaceView::RealSpaceView(QWidget* parent) : QWidget(parent), m_3dview(new RealSpace::Widget3D)
 {
diff --git a/GUI/coregui/Views/RealSpaceWidgets/TransformTo3D.h b/GUI/coregui/Views/RealSpaceWidgets/TransformTo3D.h
index 75fa375e0d6..bdc926e231f 100644
--- a/GUI/coregui/Views/RealSpaceWidgets/TransformTo3D.h
+++ b/GUI/coregui/Views/RealSpaceWidgets/TransformTo3D.h
@@ -17,8 +17,8 @@
 
 #include "WinDllMacros.h"
 #include <Vectors3D.h>
-#include <ba3d/model/layer.h>
-#include <ba3d/model/particles.h>
+#include "GUI/ba3d/model/layer.h"
+#include "GUI/ba3d/model/particles.h"
 #include <memory>
 
 class SessionItem;
diff --git a/dev-tools/sandboxes/realSpace/demo1/demo_model.cpp b/dev-tools/sandboxes/realSpace/demo1/demo_model.cpp
index 9632516e501..4fadc21946b 100644
--- a/dev-tools/sandboxes/realSpace/demo1/demo_model.cpp
+++ b/dev-tools/sandboxes/realSpace/demo1/demo_model.cpp
@@ -14,7 +14,7 @@
 
 #include "demo_model.h"
 #include <QApplication>
-#include <ba3d/model/layer.h>
+#include "GUI/ba3d/model/layer.h"
 #include <qmath.h>
 #include <thread>
 
diff --git a/dev-tools/sandboxes/realSpace/demo1/demo_model.h b/dev-tools/sandboxes/realSpace/demo1/demo_model.h
index 059b4cf9d9f..5567d64a66d 100644
--- a/dev-tools/sandboxes/realSpace/demo1/demo_model.h
+++ b/dev-tools/sandboxes/realSpace/demo1/demo_model.h
@@ -17,8 +17,8 @@
 
 #include "lattice.h"
 #include <QAtomicInteger>
-#include <ba3d/model/model.h>
-#include <ba3d/model/particles.h>
+#include "GUI/ba3d/model/model.h"
+#include "GUI/ba3d/model/particles.h"
 
 class DemoModel : public RealSpace::Model
 {
diff --git a/dev-tools/sandboxes/realSpace/demo1/lattice.h b/dev-tools/sandboxes/realSpace/demo1/lattice.h
index 8a936075f06..f6c2dc59a62 100644
--- a/dev-tools/sandboxes/realSpace/demo1/lattice.h
+++ b/dev-tools/sandboxes/realSpace/demo1/lattice.h
@@ -16,7 +16,7 @@
 #define BA3D_LATTICE_H
 
 #include <QVector>
-#include <ba3d/def.h>
+#include "GUI/ba3d/def.h"
 
 class Lattice : public QVector<RealSpace::Vector3D>
 {
diff --git a/dev-tools/sandboxes/realSpace/demo1/main.cpp b/dev-tools/sandboxes/realSpace/demo1/main.cpp
index 67fee4f528d..d1572dbbb4e 100644
--- a/dev-tools/sandboxes/realSpace/demo1/main.cpp
+++ b/dev-tools/sandboxes/realSpace/demo1/main.cpp
@@ -12,8 +12,8 @@
 //
 // ************************************************************************** //
 
-#include <ba3d/def.h>
-#include <ba3d/view/camera.h>
+#include "GUI/ba3d/def.h"
+#include "GUI/ba3d/view/camera.h"
 
 #include "demo_model.h"
 #include "mainwindow.h"
diff --git a/dev-tools/sandboxes/realSpace/demo1/mainwindow.h b/dev-tools/sandboxes/realSpace/demo1/mainwindow.h
index af753c1525c..a828a7d0742 100644
--- a/dev-tools/sandboxes/realSpace/demo1/mainwindow.h
+++ b/dev-tools/sandboxes/realSpace/demo1/mainwindow.h
@@ -17,8 +17,8 @@
 
 #include "demo_model.h"
 #include <QMainWindow>
-#include <ba3d/model/particles.h>
-#include <ba3d/widget.h>
+#include "GUI/ba3d/model/particles.h"
+#include "GUI/ba3d/widget.h"
 
 class QSlider;
 
diff --git a/dev-tools/sandboxes/realSpace/demo2/main.cpp b/dev-tools/sandboxes/realSpace/demo2/main.cpp
index 40360fcb8c1..0cf44a79fc3 100644
--- a/dev-tools/sandboxes/realSpace/demo2/main.cpp
+++ b/dev-tools/sandboxes/realSpace/demo2/main.cpp
@@ -12,8 +12,8 @@
 //
 // ************************************************************************** //
 
-#include <ba3d/def.h>
-#include <ba3d/view/camera.h>
+#include "GUI/ba3d/def.h"
+#include "GUI/ba3d/view/camera.h"
 
 #include "mainwindow.h"
 #include "modelLayers.h"
diff --git a/dev-tools/sandboxes/realSpace/demo2/mainwindow.h b/dev-tools/sandboxes/realSpace/demo2/mainwindow.h
index dc459295332..95a5838293b 100644
--- a/dev-tools/sandboxes/realSpace/demo2/mainwindow.h
+++ b/dev-tools/sandboxes/realSpace/demo2/mainwindow.h
@@ -16,8 +16,8 @@
 #define BA3D_MAINWINDOW_H
 
 #include <QMainWindow>
-#include <ba3d/model/particles.h>
-#include <ba3d/widget.h>
+#include "GUI/ba3d/model/particles.h"
+#include "GUI/ba3d/widget.h"
 
 //------------------------------------------------------------------------------
 
diff --git a/dev-tools/sandboxes/realSpace/demo2/modelLayers.cpp b/dev-tools/sandboxes/realSpace/demo2/modelLayers.cpp
index 5fbb1bf04f9..32e2a4e3988 100644
--- a/dev-tools/sandboxes/realSpace/demo2/modelLayers.cpp
+++ b/dev-tools/sandboxes/realSpace/demo2/modelLayers.cpp
@@ -14,7 +14,7 @@
 
 #include "modelLayers.h"
 #include "modelShowcase.h"
-#include <ba3d/model/layer.h>
+#include "GUI/ba3d/model/layer.h"
 
 //------------------------------------------------------------------------------
 
diff --git a/dev-tools/sandboxes/realSpace/demo2/modelLayers.h b/dev-tools/sandboxes/realSpace/demo2/modelLayers.h
index 5f36f915e1c..a1bf4f1ac5f 100644
--- a/dev-tools/sandboxes/realSpace/demo2/modelLayers.h
+++ b/dev-tools/sandboxes/realSpace/demo2/modelLayers.h
@@ -15,8 +15,8 @@
 #ifndef BA3D_MODEL_LAYERS_H
 #define BA3D_MODEL_LAYERS_H
 
-#include <ba3d/model/model.h>
-#include <ba3d/model/particles.h>
+#include "GUI/ba3d/model/model.h"
+#include "GUI/ba3d/model/particles.h"
 
 //------------------------------------------------------------------------------
 
diff --git a/dev-tools/sandboxes/realSpace/demo2/modelShowcase.h b/dev-tools/sandboxes/realSpace/demo2/modelShowcase.h
index 30f69909a45..0090d052aee 100644
--- a/dev-tools/sandboxes/realSpace/demo2/modelShowcase.h
+++ b/dev-tools/sandboxes/realSpace/demo2/modelShowcase.h
@@ -15,8 +15,8 @@
 #ifndef BA3D_MODEL_SHOWCASE_H
 #define BA3D_MODEL_SHOWCASE_H
 
-#include <ba3d/model/model.h>
-#include <ba3d/model/particles.h>
+#include "GUI/ba3d/model/model.h"
+#include "GUI/ba3d/model/particles.h"
 
 //------------------------------------------------------------------------------
 
-- 
GitLab