aboutsummaryrefslogtreecommitdiff
path: root/subprojects
diff options
context:
space:
mode:
authoraqua <aqua@iserlohn-fortress.net>2024-04-23 11:22:02 +0300
committeraqua <aqua@iserlohn-fortress.net>2024-04-23 11:38:55 +0300
commit3f72c39fb0e95d45d15bde64661040e920574a85 (patch)
tree49bde891396d92ecd61c3d833e071c897f1eabe2 /subprojects
parentFix compile error with meson unstable-kconfig module (diff)
downloadsmolbote-3f72c39fb0e95d45d15bde64661040e920574a85.tar.xz
Ported to qt6
Diffstat (limited to 'subprojects')
-rw-r--r--subprojects/packagefiles/SingleApplication/meson.build38
-rw-r--r--subprojects/packagefiles/SingleApplication/meson_options.txt1
-rw-r--r--subprojects/singleapplication.wrap10
3 files changed, 45 insertions, 4 deletions
diff --git a/subprojects/packagefiles/SingleApplication/meson.build b/subprojects/packagefiles/SingleApplication/meson.build
new file mode 100644
index 0000000..4a583cd
--- /dev/null
+++ b/subprojects/packagefiles/SingleApplication/meson.build
@@ -0,0 +1,38 @@
+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
new file mode 100644
index 0000000..21e68e0
--- /dev/null
+++ b/subprojects/packagefiles/SingleApplication/meson_options.txt
@@ -0,0 +1 @@
+option('examples', description: 'Build examples', type: 'boolean', value: false)
diff --git a/subprojects/singleapplication.wrap b/subprojects/singleapplication.wrap
index ac817db..52d0f62 100644
--- a/subprojects/singleapplication.wrap
+++ b/subprojects/singleapplication.wrap
@@ -1,6 +1,8 @@
[wrap-file]
-directory = SingleApplication-3.1.1a
+directory = SingleApplication-3.5.1
-source_url = https://neueland.iserlohn-fortress.net/releases/SingleApplication-3.1.1a.tar.xz
-source_filename = SingleApplication-3.1.1a.tar.xz
-source_hash = df21800c9f3b254048ed34f6cfe96e5a540dc8ab4533b327a6982a6030f77080
+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