mirror of https://git.tukaani.org/xz.git
CMake: Use CMAKE_THREAD_LIBS_INIT in liblzma.pc only with pthreads
This shouldn't make much difference in practice as on Windows
no flags are needed anyway and unitialized variable (when threading
is disabled) expands to empty. But it's clearer this way.
(cherry picked from commit 2aecffe0f0
)
This commit is contained in:
parent
65a10ddd43
commit
a95a9601a1
|
@ -1412,7 +1412,13 @@ else()
|
||||||
set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
|
set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(PTHREAD_CFLAGS "${CMAKE_THREAD_LIBS_INIT}")
|
# Threads::Threads is linked in only when using POSIX threads.
|
||||||
|
# Use an empty value if using Windows threads or if threading is disabled.
|
||||||
|
set(PTHREAD_CFLAGS)
|
||||||
|
if(USE_POSIX_THREADS)
|
||||||
|
set(PTHREAD_CFLAGS "${CMAKE_THREAD_LIBS_INIT}")
|
||||||
|
endif()
|
||||||
|
|
||||||
configure_file(src/liblzma/liblzma.pc.in liblzma.pc @ONLY)
|
configure_file(src/liblzma/liblzma.pc.in liblzma.pc @ONLY)
|
||||||
|
|
||||||
# Install the library binary. The INCLUDES specifies the include path that
|
# Install the library binary. The INCLUDES specifies the include path that
|
||||||
|
|
Loading…
Reference in New Issue