aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-03-07 14:08:52 +0100
committerAqua-sama <aqua@iserlohn-fortress.net>2018-03-07 14:08:52 +0100
commit5a9d3032869382ec2103e11ef785fe939f93a74f (patch)
tree2df4152aa9121d569da7b26f26986b60d1f61eb5 /src
parentShow local branch and commit in updater (diff)
downloadsmolbote-5a9d3032869382ec2103e11ef785fe939f93a74f.tar.xz
Reworked CMakeLists to be a bit more readable
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt84
-rw-r--r--src/addressbar/urllineedit.cpp2
-rw-r--r--src/addressbar/urllineedit.h2
-rw-r--r--src/browser.cpp2
-rw-r--r--src/browser.h2
-rw-r--r--src/main.cpp2
-rw-r--r--src/mainwindow/mainwindow.cpp6
-rw-r--r--src/mainwindow/widgets/searchform.cpp2
-rw-r--r--src/webengine/webview.cpp4
-rw-r--r--src/widgets/mainwindowmenubar.cpp2
-rw-r--r--src/widgets/mainwindowtabbar.cpp4
11 files changed, 98 insertions, 14 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 0000000..d2febde
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,84 @@
+# Find includes in corresponding build directories
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+# Instruct CMake to run moc automatically when needed.
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTOUIC ON)
+set(CMAKE_AUTORCC ON)
+
+# configure a header file to pass version information
+# if you don't have git, or are building this off the source tarball, define versions in version.h.in
+execute_process(COMMAND hg log -r '.' --template={latesttag} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE VcsVersion OUTPUT_STRIP_TRAILING_WHITESPACE)
+execute_process(COMMAND hg identify --id WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE VcsCommit OUTPUT_STRIP_TRAILING_WHITESPACE)
+execute_process(COMMAND hg identify --num WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE VcsRevision OUTPUT_STRIP_TRAILING_WHITESPACE)
+execute_process(COMMAND hg identify --branch WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE VcsBranch OUTPUT_STRIP_TRAILING_WHITESPACE)
+configure_file(version.h.in "${PROJECT_BINARY_DIR}/src/version.h")
+
+add_executable(poi
+ # main
+ main.cpp
+ singleapplication.cpp
+ singleapplication.h
+ browser.cpp
+ browser.h
+ configuration.cpp
+ configuration.h
+ ../data/resources.qrc
+
+ # main window
+ mainwindow/mainwindow.cpp
+ mainwindow/mainwindow.h
+ mainwindow/mainwindow.ui
+ mainwindow/widgets/loadingbar.cpp
+ mainwindow/widgets/loadingbar.h
+ mainwindow/widgets/navigationbar.cpp
+ mainwindow/widgets/navigationbar.h
+ mainwindow/widgets/searchform.cpp
+ mainwindow/widgets/searchform.h
+ mainwindow/widgets/searchform.ui
+
+ # address bar
+ addressbar/completer.cpp
+ addressbar/completer.h
+ addressbar/urllineedit.cpp
+ addressbar/urllineedit.h
+
+ # todo: move all to mainwindow
+ widgets/mainwindowmenubar.cpp
+ widgets/mainwindowmenubar.h
+ widgets/mainwindowtabbar.cpp
+ widgets/mainwindowtabbar.h
+
+ # webengine
+ webengine/cookieinterceptor.cpp
+ webengine/cookieinterceptor.h
+ webengine/urlinterceptor.cpp
+ webengine/urlinterceptor.h
+ webengine/webengineprofile.cpp # todo: rename to profile
+ webengine/webengineprofile.h
+ webengine/webpage.cpp
+ webengine/webpage.h
+ webengine/webview.cpp
+ webengine/webview.h
+
+ # forms
+ forms/aboutdialog.cpp
+ forms/aboutdialog.h
+ forms/aboutdialog.ui
+ # todo: move to webengine
+ #forms/cookiesform.cpp
+ #forms/cookiesform.h
+ #forms/cookiesform.ui
+
+ # plugin interfaces
+ ../plugins/interfaces.h commandline.cpp commandline.h)
+
+target_include_directories(poi
+ PRIVATE ../lib ../plugins)
+
+target_link_libraries(poi
+ Qt5::Core Qt5::Widgets Qt5::Concurrent Qt5::WebEngineWidgets
+ ${Boost_LIBRARIES}
+ bookmarks downloads)
+
+install(TARGETS poi RUNTIME DESTINATION bin CONFIGURATIONS Release)
diff --git a/src/addressbar/urllineedit.cpp b/src/addressbar/urllineedit.cpp
index 21effb4..fa43a58 100644
--- a/src/addressbar/urllineedit.cpp
+++ b/src/addressbar/urllineedit.cpp
@@ -11,7 +11,7 @@
#include <QMenu>
#include <QTimer>
#include <QWidgetAction>
-#include <lib/bookmarks/bookmarksview.h>
+#include <bookmarks/bookmarksview.h>
UrlLineEdit::UrlLineEdit(QWidget *parent)
: QLineEdit(parent)
diff --git a/src/addressbar/urllineedit.h b/src/addressbar/urllineedit.h
index 4c5ce82..f03b513 100644
--- a/src/addressbar/urllineedit.h
+++ b/src/addressbar/urllineedit.h
@@ -12,7 +12,7 @@
#include <QAction>
#include <QLineEdit>
#include <QTextLayout>
-#include <src/webengine/webview.h>
+#include "webengine/webview.h"
#include "completer.h"
class BookmarksView;
diff --git a/src/browser.cpp b/src/browser.cpp
index 2f2249a..22af1f0 100644
--- a/src/browser.cpp
+++ b/src/browser.cpp
@@ -7,7 +7,7 @@
*/
#include "browser.h"
-#include "src/mainwindow/mainwindow.h"
+#include "mainwindow/mainwindow.h"
#include "webengine/urlinterceptor.h"
#include <QtConcurrent>
#include <bookmarks/bookmarkswidget.h>
diff --git a/src/browser.h b/src/browser.h
index cc4cbb8..2b9317d 100644
--- a/src/browser.h
+++ b/src/browser.h
@@ -15,7 +15,7 @@
#include <QVector>
#include <memory>
#include "webengine/cookieinterceptor.h"
-#include <interfaces.h>
+#include "../plugins/interfaces.h"
class MainWindow;
class BookmarksWidget;
diff --git a/src/main.cpp b/src/main.cpp
index 6efb882..dfaad50 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -8,7 +8,7 @@
#include "browser.h"
#include "commandline.h"
-#include "src/mainwindow/mainwindow.h"
+#include "mainwindow/mainwindow.h"
#include "version.h"
#include <iomanip>
#include <iostream>
diff --git a/src/mainwindow/mainwindow.cpp b/src/mainwindow/mainwindow.cpp
index 2d7ba09..e280fee 100644
--- a/src/mainwindow/mainwindow.cpp
+++ b/src/mainwindow/mainwindow.cpp
@@ -8,15 +8,15 @@
#include "mainwindow.h"
#include "forms/aboutdialog.h"
-#include "src/mainwindow/widgets/searchform.h"
+#include "mainwindow/widgets/searchform.h"
#include "ui_mainwindow.h"
#include "widgets/mainwindowmenubar.h"
#include <QDockWidget>
#include <QMessageBox>
#include <bookmarks/bookmarkswidget.h>
#include <downloads/downloadswidget.h>
-#include <src/addressbar/urllineedit.h>
-#include <lib/bookmarks/bookmarksview.h>
+#include "addressbar/urllineedit.h"
+#include <bookmarks/bookmarksview.h>
//#include <settings/settingsdialog.h>
MainWindow::MainWindow(std::shared_ptr<Configuration> config, QWidget *parent)
diff --git a/src/mainwindow/widgets/searchform.cpp b/src/mainwindow/widgets/searchform.cpp
index 08d4470..afbde98 100644
--- a/src/mainwindow/widgets/searchform.cpp
+++ b/src/mainwindow/widgets/searchform.cpp
@@ -7,7 +7,7 @@
*/
#include "searchform.h"
-#include "src/mainwindow/mainwindow.h"
+#include "mainwindow/mainwindow.h"
#include "ui_searchform.h"
SearchForm::SearchForm(MainWindow *parentWindow, QWidget *parent)
diff --git a/src/webengine/webview.cpp b/src/webengine/webview.cpp
index 9cf0157..0b0a9e3 100644
--- a/src/webengine/webview.cpp
+++ b/src/webengine/webview.cpp
@@ -27,11 +27,11 @@
#include <QPrinter>
#include <QPrinterInfo>
-#include "src/mainwindow/mainwindow.h"
+#include "mainwindow/mainwindow.h"
#include <QStatusBar>
// ssl errors
-#include "src/addressbar/urllineedit.h"
+#include "addressbar/urllineedit.h"
WebView::WebView(MainWindow *parentMainWindow, QWidget *parent)
: QWebEngineView(parent)
diff --git a/src/widgets/mainwindowmenubar.cpp b/src/widgets/mainwindowmenubar.cpp
index 3c5b042..4aa6cc8 100644
--- a/src/widgets/mainwindowmenubar.cpp
+++ b/src/widgets/mainwindowmenubar.cpp
@@ -9,7 +9,7 @@
#include "mainwindowmenubar.h"
#include "browser.h"
#include "downloads/downloadswidget.h"
-#include "src/mainwindow/mainwindow.h"
+#include "mainwindow/mainwindow.h"
#include <QInputDialog>
MainWindowMenuBar::MainWindowMenuBar(std::shared_ptr<Configuration> config, MainWindow *parent)
diff --git a/src/widgets/mainwindowtabbar.cpp b/src/widgets/mainwindowtabbar.cpp
index 007a2d1..114b0e3 100644
--- a/src/widgets/mainwindowtabbar.cpp
+++ b/src/widgets/mainwindowtabbar.cpp
@@ -7,8 +7,8 @@
*/
#include "mainwindowtabbar.h"
-#include "src/configuration.h"
-#include "src/mainwindow/mainwindow.h"
+#include "configuration.h"
+#include "mainwindow/mainwindow.h"
#include <QContextMenuEvent>
#include <QShortcut>
#include <QMenu>