aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoraqua <aqua@iserlohn-fortress.net>2024-04-26 22:24:19 +0300
committeraqua <aqua@iserlohn-fortress.net>2024-04-26 22:43:00 +0300
commitfabf1080b62a54c7ec2dc6da7709186c80cb20cd (patch)
tree3c2500f530790b660c6d71167e172e96308aee7e /lib
parentUpdated PKGBUILD (diff)
downloadsmolbote-fabf1080b62a54c7ec2dc6da7709186c80cb20cd.tar.xz
Added cmakelists
Diffstat (limited to 'lib')
-rw-r--r--lib/bookmarks/CMakeLists.txt9
-rw-r--r--lib/bookmarks/meson.build16
-rw-r--r--lib/configuration/CMakeLists.txt6
-rw-r--r--lib/downloads/CMakeLists.txt8
-rw-r--r--lib/downloads/meson.build19
-rw-r--r--lib/pluginloader/CMakeLists.txt0
-rw-r--r--lib/session_formats/CMakeLists.txt5
-rw-r--r--lib/urlfilter/CMakeLists.txt27
-rw-r--r--lib/urlfilter/meson.build26
9 files changed, 55 insertions, 61 deletions
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