28 lines
969 B
Meson
28 lines
969 B
Meson
|
project('singleapplication')
|
||
|
|
||
|
qt5 = import('qt5')
|
||
|
dep_qt5 = dependency('qt5', modules: ['Core', 'Widgets', 'Network'])
|
||
|
|
||
|
singleapp_inc = include_directories('singleapplication.git')
|
||
|
|
||
|
singleapp_moc = qt5.preprocess(
|
||
|
moc_headers: ['singleapplication.git/singleapplication.h', 'singleapplication.git/singleapplication_p.h'],
|
||
|
moc_extra_arguments: ['-DQAPPLICATION_CLASS=QApplication'],
|
||
|
dependencies: dep_qt5
|
||
|
)
|
||
|
|
||
|
singleapp_lib = static_library('SingleApplication',
|
||
|
['singleapplication.git/singleapplication.cpp', 'singleapplication.git/singleapplication_p.cpp', singleapp_moc],
|
||
|
include_directories: singleapp_inc,
|
||
|
cpp_args : '-DQAPPLICATION_CLASS=QApplication',
|
||
|
dependencies: dep_qt5
|
||
|
)
|
||
|
|
||
|
singleapp_dep = declare_dependency(
|
||
|
include_directories: singleapp_inc,
|
||
|
link_with: singleapp_lib
|
||
|
)
|
||
|
|
||
|
# On windows, SingleApplication needs to be linked against advapi32. This is
|
||
|
# done by adding 'advapi32' to cpp_winlibs, where it should be by default.
|