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 + 2 files changed, 39 insertions(+) create mode 100644 subprojects/packagefiles/SingleApplication/meson.build create mode 100644 subprojects/packagefiles/SingleApplication/meson_options.txt (limited to 'subprojects/packagefiles/SingleApplication') 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) -- cgit v1.2.1