diff options
author | Michael Schroeder <mls@suse.de> | 2012-04-02 13:41:10 +0200 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2012-04-02 13:41:10 +0200 |
commit | d1275e7fcce9d4fc23f418d3b841d8940d2cc163 (patch) | |
tree | f5d903e463d3c317c29897e7ffd46663e95a3e9b /cmake/modules | |
parent | ab13d4e340f60848879a06b060d0bbe702d76092 (diff) | |
download | libsolv-d1275e7fcce9d4fc23f418d3b841d8940d2cc163.tar.gz libsolv-d1275e7fcce9d4fc23f418d3b841d8940d2cc163.tar.bz2 libsolv-d1275e7fcce9d4fc23f418d3b841d8940d2cc163.zip |
- make sure to link against the lzma library if ENABLE_LZMA_COMPRESSION is set
Diffstat (limited to 'cmake/modules')
-rw-r--r-- | cmake/modules/FindLZMA.cmake | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/cmake/modules/FindLZMA.cmake b/cmake/modules/FindLZMA.cmake new file mode 100644 index 0000000..eb112df --- /dev/null +++ b/cmake/modules/FindLZMA.cmake @@ -0,0 +1,25 @@ +# - Find lzma +# Find the native LZMA headers and library +# +# LZMA_INCLUDE_DIR - where to find lzma.h, etc. +# LZMA_LIBRARIES - List of libraries when using liblzma. +# LZMA_FOUND - True if liblzma found. + +IF (LZMA_INCLUDE_DIR) + # Already in cache, be silent + SET(LZMA_FIND_QUIETLY TRUE) +ENDIF (LZMA_INCLUDE_DIR) + +FIND_PATH(LZMA_INCLUDE_DIR lzma.h) +FIND_LIBRARY(LZMA_LIBRARY NAMES lzma liblzma) + +# handle the QUIETLY and REQUIRED arguments and set LZMA_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZMA DEFAULT_MSG LZMA_LIBRARY LZMA_INCLUDE_DIR) + +IF(LZMA_FOUND) + SET( LZMA_LIBRARIES ${LZMA_LIBRARY} ) +ELSE(LZMA_FOUND) + SET( LZMA_LIBRARIES ) +ENDIF(LZMA_FOUND) |