diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2015-06-11 02:45:13 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2015-12-23 02:23:00 +0100 |
commit | a64a2ffc7243373bf6a7bbc27f801a54a4630623 (patch) | |
tree | 86feed059d5b0d3744a1a59121e4685b5582bbc8 | |
parent | a1d982adfc89dd92a92df49bcfa13a0ef7579ba7 (diff) | |
download | tdelibs-a64a2ffc7243373bf6a7bbc27f801a54a4630623.tar.gz tdelibs-a64a2ffc7243373bf6a7bbc27f801a54a4630623.zip |
Fix detection of LZMA without pkgconfig file
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit d107d0b0d758225d0b01429410200f51c91efe54)
-rw-r--r-- | CMakeLists.txt | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 46726d09d..55cd43c52 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -567,8 +567,19 @@ endif( BZIP2_NEED_PREFIX ) if( WITH_LZMA ) pkg_search_module( LZMA liblzma ) if( NOT LZMA_FOUND ) - tde_message_fatal( "LZMA are requested, but not found on your system" ) + find_path( LZMA_INCLUDE_DIR lzma.h ) + find_library( LZMA_LIBRARY lzma ) + if( LZMA_LIBRARY AND LZMA_INCLUDE_DIR ) + message( STATUS "Found LZMA: ${LZMA_LIBRARY}" ) + set( LZMA_FOUND 1 ) + set( LZMA_INCLUDE_DIRS ${LZMA_INCLUDE_DIR} ) + set( LZMA_LIBRARIES lzma ) + endif( LZMA_LIBRARY AND LZMA_INCLUDE_DIR ) endif( NOT LZMA_FOUND ) + check_library_exists( lzma lzma_code "" LZMA_CODE_FOUND ) + if( NOT LZMA_FOUND OR NOT LZMA_CODE_FOUND ) + tde_message_fatal( "LZMA is requested, but not found on your system" ) + endif( NOT LZMA_FOUND OR NOT LZMA_CODE_FOUND ) set( HAVE_XZ_SUPPORT 1 ) endif( WITH_LZMA ) |