From 3f72c39fb0e95d45d15bde64661040e920574a85 Mon Sep 17 00:00:00 2001 From: aqua Date: Tue, 23 Apr 2024 11:22:02 +0300 Subject: Ported to qt6 --- .../packagefiles/SingleApplication/meson.build | 38 ++++++++++++++++++++++ .../SingleApplication/meson_options.txt | 1 + subprojects/singleapplication.wrap | 10 +++--- 3 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 subprojects/packagefiles/SingleApplication/meson.build create mode 100644 subprojects/packagefiles/SingleApplication/meson_options.txt (limited to 'subprojects') 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 -- cgit v1.2.1