summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2015-06-11 02:45:13 +0200
committerSlávek Banko <slavek.banko@axis.cz>2015-06-11 03:04:05 +0200
commit30a0743655d37b285512fc1f4169508f085abb42 (patch)
tree6864cf4d48cbd510026aeadb13f268b43a6cbc7f
parent182f65f09936303344d9d154a38ab2c752807dfa (diff)
downloadtdelibs-30a0743655d37b285512fc1f4169508f085abb42.tar.gz
tdelibs-30a0743655d37b285512fc1f4169508f085abb42.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.txt13
1 files changed, 12 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 84ceb566d..d89547ac9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -604,8 +604,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 )