aboutsummaryrefslogtreecommitdiff
path: root/subprojects/packagefiles
diff options
context:
space:
mode:
Diffstat (limited to 'subprojects/packagefiles')
-rw-r--r--subprojects/packagefiles/SingleApplication/meson.build38
-rw-r--r--subprojects/packagefiles/SingleApplication/meson_options.txt1
2 files changed, 39 insertions, 0 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)