]> git.ipfire.org Git - thirdparty/xz.git/commit
CMake: Link xz against Threads::Threads if using pthreads
authorLasse Collin <lasse.collin@tukaani.org>
Wed, 3 Jul 2024 17:45:48 +0000 (20:45 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Wed, 3 Jul 2024 17:45:48 +0000 (20:45 +0300)
commitb3e53122f42796aaebd767bab920cf7bedf69966
treec5f2e873c74fe8b68b649fe1874947367da43376
parent5742ec1fc7f2cf1c82cfe3477bb90594a4658374
CMake: Link xz against Threads::Threads if using pthreads

The liblzma target was recently changed to link against Threads::Threads
with the PRIVATE keyword. I had forgotten that xz itself depends on
pthreads too due to pthread_sigmask(). Thus, the build broke when
building shared liblzma and pthread_sigmask() wasn't in libc.

Thanks to Peter Seiderer for the bug report.

Fixes: ac05f1b0d7cda1e7ae79775a8dfecc54601d7f1c
Fixes: https://github.com/tukaani-project/xz/issues/129#issuecomment-2204522994
CMakeLists.txt