diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-04-13 11:35:02 +0300 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-04-13 11:35:02 +0300 |
commit | 6f2169ca6924100f309039efb502ae1af2d27113 (patch) | |
tree | 82efcb543cea648bf0e9c636947571d7e3ae85f9 /meson.build | |
parent | Fix old-style cast warnings (diff) | |
download | singleapplication-6f2169ca6924100f309039efb502ae1af2d27113.tar.xz |
Add meson build support
Remove CMakeLists and qmake project files
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..c85b439 --- /dev/null +++ b/meson.build @@ -0,0 +1,38 @@ +project('SingleApplication', ['cpp'], + version: '3.1.0b', + default_options: ['cpp_std=c++2a', 'warning_level=3'], + license: 'MIT', +) + +mod_qt5 = import('qt5') +dep_qt5 = dependency('qt5', 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 + |