2019-03-14 20:07:06 +01:00
|
|
|
if is_windows
|
|
|
|
# avoid the unused libwinpthread-1.dll dependency on Windows; MPD
|
|
|
|
# doesn't use the pthread API on Windows, but this is what Meson
|
|
|
|
# unhelpfully detects for us
|
|
|
|
threads_dep = []
|
|
|
|
else
|
|
|
|
threads_dep = dependency('threads')
|
|
|
|
endif
|
2018-11-19 15:56:30 +01:00
|
|
|
|
|
|
|
conf.set('HAVE_PTHREAD_SETNAME_NP', compiler.has_function('pthread_setname_np', dependencies: threads_dep))
|
|
|
|
|
2017-12-29 17:12:55 +01:00
|
|
|
thread = static_library(
|
|
|
|
'thread',
|
|
|
|
'Util.cxx',
|
|
|
|
'Thread.cxx',
|
|
|
|
include_directories: inc,
|
|
|
|
dependencies: [
|
2018-11-19 15:56:30 +01:00
|
|
|
threads_dep,
|
2017-12-29 17:12:55 +01:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
thread_dep = declare_dependency(
|
|
|
|
link_with: thread,
|
2023-03-06 20:06:41 +01:00
|
|
|
dependencies: [
|
|
|
|
fmt_dep,
|
|
|
|
],
|
2017-12-29 17:12:55 +01:00
|
|
|
)
|