mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-03 20:29:56 -06:00
libarchive: Fix lzma_stream_encoder_mt detection
The test for lzma_stream_encoder_mt was always failing because the lzma libraries weren't being used by linker.
This commit is contained in:
@@ -1475,9 +1475,15 @@ CHECK_C_SOURCE_COMPILES(
|
||||
"#include <sys/sysmacros.h>\nint main() { return major(256); }"
|
||||
MAJOR_IN_SYSMACROS)
|
||||
|
||||
CMAKE_PUSH_CHECK_STATE()
|
||||
SET(CMAKE_REQUIRED_LIBRARIES ${LIBLZMA_LIBRARIES})
|
||||
SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIR})
|
||||
|
||||
CHECK_C_SOURCE_COMPILES(
|
||||
"#include <lzma.h>\n#if LZMA_VERSION < 50020000\n#error unsupported\n#endif\nint main(void){lzma_stream_encoder_mt(0, 0); return 0;}"
|
||||
HAVE_LZMA_STREAM_ENCODER_MT)
|
||||
HAVE_LZMA_STREAM_ENCODER_MT)
|
||||
|
||||
CMAKE_POP_CHECK_STATE()
|
||||
|
||||
IF(HAVE_STRERROR_R)
|
||||
SET(HAVE_DECL_STRERROR_R 1)
|
||||
|
||||
Reference in New Issue
Block a user