2009-03-10 23:07:37 +00:00
|
|
|
cmake_minimum_required( VERSION 2.4 )
|
|
|
|
|
2013-10-12 04:24:04 +00:00
|
|
|
make_release_only()
|
|
|
|
|
2014-06-25 23:23:41 +00:00
|
|
|
if( ZD_CMAKE_COMPILER_IS_GNUC_COMPATIBLE )
|
2011-06-12 19:17:21 +00:00
|
|
|
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fomit-frame-pointer" )
|
2014-06-25 23:23:41 +00:00
|
|
|
endif( ZD_CMAKE_COMPILER_IS_GNUC_COMPATIBLE )
|
2009-03-10 23:07:37 +00:00
|
|
|
|
2015-12-31 15:23:54 +00:00
|
|
|
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_7ZIP_PPMD_SUPPPORT" )
|
|
|
|
|
2009-03-10 23:07:37 +00:00
|
|
|
set( LZMA_FILES
|
2015-12-31 15:23:54 +00:00
|
|
|
C/7zArcIn.c
|
2009-04-15 03:58:10 +00:00
|
|
|
C/7zBuf.c
|
|
|
|
C/7zCrc.c
|
2014-04-27 10:05:40 +00:00
|
|
|
C/7zCrcOpt.c
|
|
|
|
C/7zDec.c
|
2009-04-15 03:58:10 +00:00
|
|
|
C/7zStream.c
|
2014-04-27 10:05:40 +00:00
|
|
|
C/Bcj2.c
|
|
|
|
C/Bra.c
|
|
|
|
C/Bra86.c
|
2015-12-31 15:23:54 +00:00
|
|
|
C/BraIA64.c
|
2014-04-27 10:05:40 +00:00
|
|
|
C/CpuArch.c
|
2015-12-31 15:23:54 +00:00
|
|
|
C/Delta.c
|
2014-04-27 10:05:40 +00:00
|
|
|
C/LzFind.c
|
|
|
|
C/Lzma2Dec.c
|
|
|
|
C/LzmaDec.c
|
2015-12-31 15:23:54 +00:00
|
|
|
C/LzmaEnc.c
|
|
|
|
C/Ppmd7.c
|
|
|
|
C/Ppmd7Dec.c )
|
2009-03-10 23:07:37 +00:00
|
|
|
|
|
|
|
if( WIN32 )
|
2014-04-27 10:05:40 +00:00
|
|
|
set( LZMA_FILES ${LZMA_FILES} C/LzFindMt.c C/Threads.c )
|
|
|
|
else( WIN32 )
|
|
|
|
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_7ZIP_ST" )
|
2009-03-10 23:07:37 +00:00
|
|
|
endif( WIN32 )
|
|
|
|
|
|
|
|
add_library( lzma ${LZMA_FILES} )
|
|
|
|
target_link_libraries( lzma )
|