diff options
-rw-r--r-- | CMakeLists.txt | 36 | ||||
-rw-r--r-- | lib/bookmarks/CMakeLists.txt | 9 | ||||
-rw-r--r-- | lib/bookmarks/meson.build | 16 | ||||
-rw-r--r-- | lib/configuration/CMakeLists.txt | 6 | ||||
-rw-r--r-- | lib/downloads/CMakeLists.txt | 8 | ||||
-rw-r--r-- | lib/downloads/meson.build | 19 | ||||
-rw-r--r-- | lib/pluginloader/CMakeLists.txt | 0 | ||||
-rw-r--r-- | lib/session_formats/CMakeLists.txt | 5 | ||||
-rw-r--r-- | lib/urlfilter/CMakeLists.txt | 27 | ||||
-rw-r--r-- | lib/urlfilter/meson.build | 26 | ||||
-rw-r--r-- | src/CMakeLists.txt | 76 | ||||
-rw-r--r-- | src/about/CMakeLists.txt | 12 | ||||
-rw-r--r-- | src/about/aboutdialog.cpp | 6 | ||||
-rw-r--r-- | src/about/meson.build | 21 | ||||
-rw-r--r-- | src/browser.cpp | 13 | ||||
-rw-r--r-- | src/main.cpp | 117 | ||||
-rw-r--r-- | src/version.h.in (renamed from include/version.h.in) | 2 | ||||
-rw-r--r-- | src/webengine/CMakeLists.txt | 10 | ||||
-rw-r--r-- | subprojects/args.wrap | 6 | ||||
-rw-r--r-- | subprojects/catch2.wrap | 10 | ||||
-rw-r--r-- | subprojects/packagefiles/SingleApplication/meson.build | 38 | ||||
-rw-r--r-- | subprojects/packagefiles/SingleApplication/meson_options.txt | 1 | ||||
-rw-r--r-- | subprojects/singleapplication.wrap | 8 | ||||
-rw-r--r-- | subprojects/spdlog.wrap | 10 |
24 files changed, 215 insertions, 267 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..5fae124 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.16) + +project(smolbote VERSION 0.1.0 LANGUAGES CXX) + +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +# set C++ standard for all targets +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + +# dependencies +find_package(GTest) +enable_testing() + +find_package(spdlog) + +find_package(Qt6 6.0.0 COMPONENTS Network Widgets SvgWidgets WebEngineCore WebEngineWidgets Concurrent REQUIRED) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTOUIC ON) +set(CMAKE_AUTORCC ON) + +set(QAPPLICATION_CLASS QApplication CACHE STRING "Inheritance class for SingleApplication") +add_subdirectory(third_party/SingleApplication) + +add_subdirectory(lib/bookmarks) +add_subdirectory(lib/configuration) +add_subdirectory(lib/downloads) +#add_subdirectory(lib/pluginloader) +add_subdirectory(lib/session_formats) +add_subdirectory(lib/urlfilter) + +add_subdirectory(src/about) +add_subdirectory(src/webengine) +add_subdirectory(src) + diff --git a/lib/bookmarks/CMakeLists.txt b/lib/bookmarks/CMakeLists.txt new file mode 100644 index 0000000..d4bd3c7 --- /dev/null +++ b/lib/bookmarks/CMakeLists.txt @@ -0,0 +1,9 @@ +add_library(bookmarks STATIC + bookmarkformat.cpp bookmarkformat.h + bookmarkitem.cpp bookmarkitem.h + bookmarkmodel.cpp bookmarkmodel.h + formats/xbel.cpp formats/xbel.h + formats/ffjson.cpp formats/ffjson.h +) +target_link_libraries(bookmarks PUBLIC Qt6::Widgets) +target_include_directories(bookmarks PUBLIC ${CMAKE_CURRENT_LIST_DIR}) diff --git a/lib/bookmarks/meson.build b/lib/bookmarks/meson.build deleted file mode 100644 index 81c1ece..0000000 --- a/lib/bookmarks/meson.build +++ /dev/null @@ -1,16 +0,0 @@ -bookmarks_moc = mod_qt5.preprocess( - moc_headers: [ 'bookmarkmodel.h' ], - dependencies: dep_qt5 -) - -bookmarks_lib = static_library('bookmarks', - [ bookmarks_moc, - 'bookmarkformat.cpp', 'formats/xbel.cpp', 'formats/ffjson.cpp', - 'bookmarkitem.cpp', 'bookmarkmodel.cpp' ], - dependencies: dep_qt5 -) - -dep_bookmarks = declare_dependency( - include_directories: include_directories('.'), - link_with: bookmarks_lib -) diff --git a/lib/configuration/CMakeLists.txt b/lib/configuration/CMakeLists.txt new file mode 100644 index 0000000..9e2f34e --- /dev/null +++ b/lib/configuration/CMakeLists.txt @@ -0,0 +1,6 @@ +add_library(configuration STATIC + configuration.cpp configuration.h + qt_specialization.cpp qt_specialization.h +) +target_link_libraries(configuration PUBLIC Qt6::Gui) +target_include_directories(configuration PUBLIC ${CMAKE_CURRENT_LIST_DIR}) diff --git a/lib/downloads/CMakeLists.txt b/lib/downloads/CMakeLists.txt new file mode 100644 index 0000000..b310e3a --- /dev/null +++ b/lib/downloads/CMakeLists.txt @@ -0,0 +1,8 @@ +add_library(downloads STATIC + downloadsform.ui + downloadswidget.cpp downloadswidget.h + widgets/downloaditemform.ui widgets/downloaditemwidget.cpp widgets/downloaditemwidget.h + widgets/elidedlabel.cpp widgets/elidedlabel.h +) +target_link_libraries(downloads PUBLIC Qt6::Widgets Qt6::WebEngineWidgets) +target_include_directories(downloads PUBLIC ${CMAKE_CURRENT_LIST_DIR}) diff --git a/lib/downloads/meson.build b/lib/downloads/meson.build deleted file mode 100644 index 9b86391..0000000 --- a/lib/downloads/meson.build +++ /dev/null @@ -1,19 +0,0 @@ -downloads_inc = include_directories('.') -downloads_moc = mod_qt5.preprocess( - moc_headers: ['downloadswidget.h', 'widgets/downloaditemwidget.h', 'widgets/elidedlabel.h'], - ui_files: ['downloadsform.ui', 'widgets/downloaditemform.ui'], - dependencies: dep_qt5 -) - -downloads_lib = static_library('downloads', - ['downloadswidget.cpp', downloads_moc, - 'widgets/downloaditemwidget.cpp', 'widgets/elidedlabel.cpp'], - dependencies: dep_qt5 -) - -dep_downloads = declare_dependency( - include_directories: downloads_inc, - link_with: downloads_lib, - sources: ['downloadswidget.cpp', downloads_moc, - 'widgets/downloaditemwidget.cpp', 'widgets/elidedlabel.cpp'] -) diff --git a/lib/pluginloader/CMakeLists.txt b/lib/pluginloader/CMakeLists.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/lib/pluginloader/CMakeLists.txt diff --git a/lib/session_formats/CMakeLists.txt b/lib/session_formats/CMakeLists.txt new file mode 100644 index 0000000..c043559 --- /dev/null +++ b/lib/session_formats/CMakeLists.txt @@ -0,0 +1,5 @@ +add_library(session_formats STATIC + session_json.cpp session_json.hpp +) +target_link_libraries(session_formats PUBLIC Qt6::Core) +target_include_directories(session_formats PUBLIC ${CMAKE_CURRENT_LIST_DIR} ${PROJECT_SOURCE_DIR}/include) diff --git a/lib/urlfilter/CMakeLists.txt b/lib/urlfilter/CMakeLists.txt new file mode 100644 index 0000000..012839d --- /dev/null +++ b/lib/urlfilter/CMakeLists.txt @@ -0,0 +1,27 @@ +add_library(urlfilter STATIC + matcher.h urlfilter.h + adblock/adblocklist.cpp adblock/adblocklist.h + adblock/parser.cpp adblock/parser.h + hostlist/hostlist.cpp hostlist/hostlist.h +) +target_link_libraries(urlfilter PUBLIC Qt6::WebEngineCore) +target_include_directories(urlfilter PUBLIC ${CMAKE_CURRENT_LIST_DIR}) + + +add_executable(test_urlfilter_matcher test/matcher.cpp) +target_link_libraries(test_urlfilter_matcher PUBLIC urlfilter GTest::gtest_main) +gtest_add_tests(TARGET test_urlfilter_matcher + SOURCES test/matcher.cpp + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/test) + +add_executable(test_urlfilter_hostlist test/hostlist.cpp) +target_link_libraries(test_urlfilter_hostlist PUBLIC urlfilter GTest::gtest_main) +gtest_add_tests(TARGET test_urlfilter_hostlist + SOURCES test/hostlist.cpp + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/test) + +add_executable(test_urlfilter_adblock test/adblock.cpp) +target_link_libraries(test_urlfilter_adblock PUBLIC urlfilter GTest::gtest_main) +gtest_add_tests(TARGET test_urlfilter_adblock + SOURCES test/adblock.cpp + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/test) diff --git a/lib/urlfilter/meson.build b/lib/urlfilter/meson.build deleted file mode 100644 index 2591028..0000000 --- a/lib/urlfilter/meson.build +++ /dev/null @@ -1,26 +0,0 @@ -urlfilter_lib = static_library('urlfilter', - ['urlfilter.h', 'matcher.h', - 'hostlist/hostlist.cpp', 'hostlist/hostlist.h', - 'adblock/adblocklist.cpp', 'adblock/adblocklist.h', 'adblock/parser.cpp', 'adblock/parser.h'], - dependencies: dep_qt5 -) - -dep_urlfilter = declare_dependency( - include_directories: include_directories('.'), - link_with: urlfilter_lib -) - -if dep_gtest.found() - test('urlfilter: matcher', - executable('urlfilter-matcher', dependencies: [dep_qt5, dep_gtest, dep_urlfilter], sources: ['test/matcher.cpp']), - workdir: meson.current_source_dir() / 'test' - ) - test('urlfilter: host list', - executable('urlfilter-hostlist', dependencies: [dep_qt5, dep_gtest, dep_urlfilter], sources: ['test/hostlist.cpp']), - workdir: meson.current_source_dir() / 'test' - ) - test('urlfilter: adblock list', - executable('urlfilter-adblocklist', dependencies: [dep_qt5, dep_gtest, dep_urlfilter], sources: ['test/adblock.cpp']), - workdir: meson.current_source_dir() / 'test' - ) -endif diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..b1ec891 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,76 @@ +# settings.h +add_custom_target(settings.h + ${PROJECT_SOURCE_DIR}/scripts/gen-default-cfg.py + --kconfig ${PROJECT_SOURCE_DIR}/Kconfig + --dotconfig ${PROJECT_SOURCE_DIR}/linux/.config + --input ${CMAKE_CURRENT_LIST_DIR}/settings.h.in + --output settings.h + BYPRODUCTS settings.h +) + +# version.h +configure_file(version.h.in version.h) + +add_executable(poi + applicationmenu.cpp + applicationmenu.h + bookmarks/bookmarksform.ui + bookmarks/bookmarkstoolbar.cpp + bookmarks/bookmarkstoolbar.h + bookmarks/bookmarkswidget.cpp + bookmarks/bookmarkswidget.h + #bookmarks/builtins.cpp + bookmarks/editbookmarkdialog.cpp + bookmarks/editbookmarkdialog.h + bookmarks/editbookmarkdialog.ui + browser.cpp + browser.h + #builtins.cpp + #builtins.h + #crashhandler.cpp + #crashhandler.h + #crashhandler_dummy.cpp + main.cpp + mainwindow/addressbar.cpp + mainwindow/addressbar.h + mainwindow/addressbar.ui + mainwindow/mainwindow.cpp + mainwindow/mainwindow.h + mainwindow/menubar.cpp + mainwindow/menubar.h + mainwindow/widgets/completer.cpp + mainwindow/widgets/completer.h + mainwindow/widgets/dockwidget.cpp + mainwindow/widgets/dockwidget.h + mainwindow/widgets/menusearch.cpp + mainwindow/widgets/menusearch.h + mainwindow/widgets/navigationbar.cpp + mainwindow/widgets/navigationbar.h + mainwindow/widgets/searchform.cpp + mainwindow/widgets/searchform.h + mainwindow/widgets/searchform.ui + mainwindow/widgets/urllineedit.cpp + mainwindow/widgets/urllineedit.h + session/savesessiondialog.cpp + session/savesessiondialog.h + session/savesessiondialog.ui + session/sessiondialog.cpp + session/sessiondialog.h + session/sessiondialog.ui + subwindow/subwindow.cpp + subwindow/subwindow.h + subwindow/tabwidget.cpp + subwindow/tabwidget.h + util.cpp + util.h + wallet/wallet.cpp + wallet/wallet.h +) +target_sources(poi PRIVATE settings.h) +target_include_directories(poi PRIVATE ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_CURRENT_BINARY_DIR}) +target_link_libraries(poi + PRIVATE SingleApplication::SingleApplication spdlog::spdlog + PRIVATE bookmarks configuration downloads session_formats urlfilter + PRIVATE about webengine +) + diff --git a/src/about/CMakeLists.txt b/src/about/CMakeLists.txt new file mode 100644 index 0000000..f1e2c41 --- /dev/null +++ b/src/about/CMakeLists.txt @@ -0,0 +1,12 @@ +add_library(about STATIC + aboutdialog.cpp aboutdialog.h aboutdialog.ui + aboutplugin.cpp aboutplugin.h aboutplugin.ui +) +target_link_libraries(about PUBLIC Qt6::Widgets Qt6::SvgWidgets) +target_include_directories(about PUBLIC ${CMAKE_CURRENT_LIST_DIR}) + +# tests +add_executable(test_about test/main.cpp) +target_link_libraries(test_about PRIVATE about) +add_test(NAME about_dialog COMMAND $<TARGET_FILE:test_about> -platform offscreen) +set_property(TEST about_dialog PROPERTY ENVIRONMENT autoclose=1) diff --git a/src/about/aboutdialog.cpp b/src/about/aboutdialog.cpp index 894b1ec..1013866 100644 --- a/src/about/aboutdialog.cpp +++ b/src/about/aboutdialog.cpp @@ -8,7 +8,6 @@ #include "aboutdialog.h" #include "ui_aboutdialog.h" -#include <version.h> // compiler // clang also defines __GNUC__, so we need to check for clang first @@ -59,7 +58,7 @@ AboutDialog::AboutDialog(QWidget *parent) "<p>This program is distributed in the hope that it will be useful, but without any warranty.</p>" "<p>You can read the full terms of the license on <a href='https://www.gnu.org/licenses/gpl-3.0.en.html'>the GNU website</a>.</p>")); - ui->detailsLabel->setText(tr("<p>Version " poi_Version "</p>" + ui->detailsLabel->setText(tr("<p>Version %1</p>" "<p>Compiled with " compiler "</p>" "<p>Libraries: <ul>" "<li><a href='https://www.qt.io/'>Qt5</a> " QT_VERSION_STR "</li>" @@ -69,7 +68,8 @@ AboutDialog::AboutDialog(QWidget *parent) #ifdef CONFIG_USEBREAKPAD "<li><a href='https://chromium.googlesource.com/breakpad/breakpad'>Breakpad</a></li>" #endif - "</ul></p>")); + "</ul></p>") + .arg(qApp->applicationVersion())); } AboutDialog::~AboutDialog() diff --git a/src/about/meson.build b/src/about/meson.build deleted file mode 100644 index 49274a8..0000000 --- a/src/about/meson.build +++ /dev/null @@ -1,21 +0,0 @@ -about_moc = mod_qt5.preprocess( - moc_headers: ['aboutdialog.h', 'aboutplugin.h'], - ui_files: ['aboutdialog.ui', 'aboutplugin.ui'], - dependencies: dep_qt5 -) - -dep_about = declare_dependency( - include_directories: '.', - link_with: static_library('about', - [ 'aboutdialog.cpp', 'aboutplugin.cpp', about_moc, version_h], - dependencies: [dep_qt5]) -) - -poi_sourceset.add(dep_about) - -test('about dialog', executable('about', - sources: 'test/main.cpp', - dependencies: [ dep_qt5, dep_about, dep_catch ]), - args: [ '-platform', 'offscreen' ], - env: 'autoclose=1' -) diff --git a/src/browser.cpp b/src/browser.cpp index f748e2f..a2ae8c9 100644 --- a/src/browser.cpp +++ b/src/browser.cpp @@ -31,7 +31,7 @@ #include <QTimer> #include <QTranslator> #include <QVersionNumber> -#include <pluginloader.h> +// #include <pluginloader.h> #include <spdlog/spdlog.h> #include <version.h> @@ -142,22 +142,31 @@ bool Browser::loadPlugin(const QString &path) } Configuration conf; + bool loaded = false; + +#ifdef HAVE_PLUGINLOADER const auto state = PluginLoader::signature_state( conf.value<bool>("plugins.signature.ignored").value(), conf.value<bool>("plugins.signature.checked").value(), conf.value<bool>("plugins.signature.enforced").value()); auto *loader = new PluginLoader(path, state, this); - const bool loaded = loader->load(); + loaded = loader->load(); +#endif if(!loaded) { +#ifdef HAVE_PLUGINLOADER delete loader; +#endif return false; } +#ifdef HAVE_PLUGINLOADER auto *info = new PluginInfo(loader); m_plugins.append(info); emit pluginAdded(loader); +#endif + return true; } diff --git a/src/main.cpp b/src/main.cpp index aa08236..60c3031 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -7,36 +7,16 @@ */ #include "browser.h" -#include "builtins.h" #include "configuration.h" -#include "crashhandler.h" #include "session/sessiondialog.h" #include "session_json.hpp" #include "settings.h" -#include "util.h" -#include "version.h" +#include <QCommandLineParser> #include <QFile> #include <QPluginLoader> #include <QStandardPaths> -#include <iostream> -#include <memory> -#include <pluginloader.h> #include <spdlog/spdlog.h> -// a helper function to join the keys of a command_map into a string -inline std::string join_keys(const command_map &map, const std::string sep = ", ") -{ - std::vector<std::string> keys(map.size()); - std::transform(map.begin(), map.end(), keys.begin(), [](auto pair) { return pair.first; }); - std::sort(keys.begin(), keys.end()); - - std::string k; - std::for_each(keys.begin(), keys.end() - 1, [&k, &sep](const std::string &piece) { k += piece + sep; }); - k += keys.back(); - - return k; -} - int main(int argc, char **argv) { // change log pattern @@ -45,105 +25,30 @@ int main(int argc, char **argv) spdlog::set_level(spdlog::level::debug); // Set global log level to debug #endif - const command_map commands{ - { "configuration", builtins::configuration }, - { "bookmarks", builtins::bookmarks }, - }; - - const std::vector<std::string> args(argv + 1, argv + argc); - args::ArgumentParser parser("smolbote: yet another no-frills browser", "Subcommands: " + join_keys(commands)); - parser.Prog(argv[0]); - - args::HelpFlag cmd_help(parser, "help", "Display this help message.", { 'h', "help" }); - args::Flag cmd_version(parser, "version", "Display version information.", { 'v', "version" }); - args::Flag cmd_build(parser, "build", "Display build commit.", { 'b', "build" }); - - args::ValueFlag<std::string> cmd_config(parser, "config", "Set the configuration file.", { 'c', "config" }); - - args::Flag cmd_noRemote(parser, "no-remote", "Do not accept or send remote commands.", { "no-remote" }); - - args::Flag cmd_pickSession(parser, "pick-session", "Show all available sessions and select which one to open", { "pick-session" }); - args::ValueFlag<std::string> cmd_session(parser, "session", "Open the specified session.", { 's', "session" }); - - args::PositionalList<std::string> cmd_args(parser, "URL(s)", "List of URLs to open"); - cmd_args.KickOut(true); - - try { - auto next = parser.ParseArgs(args); - - if(cmd_version) - return builtins::version(); - if(cmd_build) - return builtins::build(); - - // create and load configuration - spdlog::debug("Loading configuration {}", init_conf(args::get(cmd_config))); - - if(cmd_args) { - const auto front = args::get(cmd_args).front(); - const auto cmd = commands.find(front); - if(cmd != commands.end()) { - return cmd->second(argv[0], next, std::end(args)); - } - } - - } catch(args::Help &) { - std::cout << parser; - return 0; - - } catch(args::Error &e) { - std::cerr << e.what() << std::endl; - std::cerr << parser; - return -1; - } + init_conf(""); // argc, argv, allowSecondary Browser app(argc, argv); // set this, otherwise the webview becomes black when using a stylesheet app.setAttribute(Qt::AA_DontCreateNativeWidgetSiblings, true); - { - Configuration conf; - - if(conf.value<bool>("usebreakpad").value()) { - /* FIXME - CrashHandler::Context ctx( - conf.value<std::string>("path.crashdump").value(), - conf.value<std::string>("path.crashhandler").value()); - - if(CrashHandler::install_handler(ctx)) { - spdlog::info("Installed breakpad crash handler: {}", ctx.dumppath); - } else { - spdlog::warn("Failed to install breakpad crash handler: {}", ctx.dumppath); - } - */ - } - - // load plugins - for(const QString &path : Util::files(conf.value<QString>("plugins.path").value(), { "*.so", "*.dll" })) { - if(app.loadPlugin(path)) { - spdlog::debug("Loaded plugin [{}]", qUtf8Printable(path)); - } else { - spdlog::warn("Failed loading plugin [{}]", qUtf8Printable(path)); - } - } - } + QCommandLineParser parser; + parser.addHelpOption(); + parser.addPositionalArgument("url", "URLs to open"); + parser.process(app); const auto profile = []() { Configuration c; return c.value<QString>("profile.default").value(); }(); - QStringList urls; - for(const auto &u : args::get(cmd_args)) { - urls.append(QString::fromStdString(u)); - } + QStringList urls = parser.positionalArguments(); if(urls.isEmpty()) { urls.append(QString()); } // if app is primary, create new sessions from received messages - if(app.isPrimary() && !cmd_noRemote) { + if(app.isPrimary() /*&& !cmd_noRemote*/) { QObject::connect(&app, &Browser::receivedMessage, &app, [&app](quint32 instanceId, QByteArray message) { Q_UNUSED(instanceId); JsonSession session(message); @@ -153,7 +58,7 @@ int main(int argc, char **argv) { const auto session = [&]() { - if(cmd_session) { + /*if(cmd_session) { QFile sessionJson(QString::fromStdString(args::get(cmd_session))); if(sessionJson.open(QIODevice::ReadOnly | QIODevice::Text)) { return JsonSession(sessionJson.readAll()); @@ -164,11 +69,11 @@ int main(int argc, char **argv) if(const auto pick = dlg.pickSession()) { return JsonSession(pick.value()); } - } + }*/ return JsonSession(profile, urls); }(); - if(app.isPrimary() || cmd_noRemote) { + if(app.isPrimary() /*|| cmd_noRemote */) { app.open(session.get()); } else { // app is secondary and not standalone diff --git a/include/version.h.in b/src/version.h.in index 44f10d9..b387811 100644 --- a/include/version.h.in +++ b/src/version.h.in @@ -3,6 +3,6 @@ // output of 'git describe --long --abbrev=40': // x.y.z-0-g0123456789012345678901234567890123456789 -#define poi_Version "@VCS_TAG@" +#define poi_Version "@CMAKE_PROJECT_VERSION@" #endif // SMOLBOTE_VERSION_H diff --git a/src/webengine/CMakeLists.txt b/src/webengine/CMakeLists.txt new file mode 100644 index 0000000..704a6d0 --- /dev/null +++ b/src/webengine/CMakeLists.txt @@ -0,0 +1,10 @@ +add_library(webengine STATIC + urlinterceptor.cpp urlinterceptor.h + webpage.cpp webpage.h + webprofile.cpp webprofile.h + webprofilemanager.cpp webprofilemanager.h + webviewcontextmenu.cpp webviewcontextmenu.h + webview.cpp webview.h +) +target_link_libraries(webengine PUBLIC Qt6::WebEngineCore Qt6::WebEngineWidgets) +target_include_directories(webengine PUBLIC ${CMAKE_CURRENT_LIST_DIR} ${PROJECT_SOURCE_DIR}/include) diff --git a/subprojects/args.wrap b/subprojects/args.wrap deleted file mode 100644 index ac19afa..0000000 --- a/subprojects/args.wrap +++ /dev/null @@ -1,6 +0,0 @@ -[wrap-file] -directory = args.hxx-6.2.2 - -source_url = https://neueland.iserlohn-fortress.net/releases/args.hxx-6.2.2.tar.xz -source_filename = args.hxx-6.2.2.tar.xz -source_hash = c1ed4bc76d3c343f493e6ae2c10ebcf3fdfaf013210b0a3dead04cef30c63fb6 diff --git a/subprojects/catch2.wrap b/subprojects/catch2.wrap deleted file mode 100644 index 2e20085..0000000 --- a/subprojects/catch2.wrap +++ /dev/null @@ -1,10 +0,0 @@ -[wrap-file] -directory = Catch2-2.11.3 - -source_url = https://github.com/catchorg/Catch2/archive/v2.11.3.zip -source_filename = Catch2-2.11.3.zip -source_hash = c5a0a7510379c6f37f70b329986a335a7b8489d67ac417ce8f4262d0cae4cc5d - -patch_url = https://wrapdb.mesonbuild.com/v1/projects/catch2/2.11.3/1/get_zip -patch_filename = catch2-2.11.3-1-wrap.zip -patch_hash = 63c09cb68280435040ad304b3dd87ecfe69dbc216608991d0a82569a63119e57 diff --git a/subprojects/packagefiles/SingleApplication/meson.build b/subprojects/packagefiles/SingleApplication/meson.build deleted file mode 100644 index 4a583cd..0000000 --- a/subprojects/packagefiles/SingleApplication/meson.build +++ /dev/null @@ -1,38 +0,0 @@ -project('SingleApplication', ['cpp'], - version: '3.5.1', - default_options: ['cpp_std=c++2a', 'warning_level=3'], - license: 'MIT', -) - -mod_qt5 = import('qt6') -dep_qt5 = dependency('qt6', modules: [ 'Core', 'Network', 'Gui', 'Widgets' ], include_type: 'system') - -SingleApplication_inc = include_directories('.') - -SingleApplication_moc = mod_qt5.preprocess( - moc_headers: [ 'singleapplication.h', 'singleapplication_p.h'], - moc_extra_arguments: ['-DQAPPLICATION_CLASS=QApplication'], - dependencies: dep_qt5 -) - -SingleApplication_lib = static_library('SingleApplication', - [ 'singleapplication.cpp', 'singleapplication_p.cpp', SingleApplication_moc ], - include_directories: SingleApplication_inc, - cpp_args: '-DQAPPLICATION_CLASS=QApplication', - dependencies: dep_qt5 -) - -SingleApplication_dep = declare_dependency( - include_directories: SingleApplication_inc, - link_with: SingleApplication_lib -).as_system('system') - -# On windows, SingleApplication needs to be linked against advapi32. This is -# done by adding 'advapi32' to cpp_winlibs, where it should be by default. - -if get_option('examples') - subdir('examples/basic') - subdir('examples/calculator') - subdir('examples/sending_arguments') -endif - diff --git a/subprojects/packagefiles/SingleApplication/meson_options.txt b/subprojects/packagefiles/SingleApplication/meson_options.txt deleted file mode 100644 index 21e68e0..0000000 --- a/subprojects/packagefiles/SingleApplication/meson_options.txt +++ /dev/null @@ -1 +0,0 @@ -option('examples', description: 'Build examples', type: 'boolean', value: false) diff --git a/subprojects/singleapplication.wrap b/subprojects/singleapplication.wrap deleted file mode 100644 index 52d0f62..0000000 --- a/subprojects/singleapplication.wrap +++ /dev/null @@ -1,8 +0,0 @@ -[wrap-file] -directory = SingleApplication-3.5.1 - -source_url = https://github.com/itay-grudev/SingleApplication/archive/refs/tags/v3.5.1.tar.gz -source_filename = SingleApplication-3.5.1.tar.gz -source_hash = d2f02d94887bd8ffbf2a1a4bbc83293f4393dfbfa34f746ac627ea6ca18415ac - -patch_directory = SingleApplication diff --git a/subprojects/spdlog.wrap b/subprojects/spdlog.wrap deleted file mode 100644 index b0f760b..0000000 --- a/subprojects/spdlog.wrap +++ /dev/null @@ -1,10 +0,0 @@ -[wrap-file] -directory = spdlog-1.4.2 - -source_url = https://github.com/gabime/spdlog/archive/v1.4.2.tar.gz -source_filename = v1.4.2.tar.gz -source_hash = 821c85b120ad15d87ca2bc44185fa9091409777c756029125a02f81354072157 - -patch_url = https://wrapdb.mesonbuild.com/v1/projects/spdlog/1.4.2/1/get_zip -patch_filename = spdlog-1.4.2-1-wrap.zip -patch_hash = e0616f2a956670b0b23daba08f14d4f51a9551e74071269bc218cd05b666b229 |