2021-03-08 12:56:57 +00:00
|
|
|
cmake_minimum_required( VERSION 3.1.0 )
|
2009-03-10 23:07:37 +00:00
|
|
|
|
2013-10-12 04:24:04 +00:00
|
|
|
make_release_only()
|
|
|
|
|
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 )
|
2021-11-27 14:00:09 +00:00
|
|
|
set( LZMA_FILES ${LZMA_FILES} C/LzFindMt.c C/LzFindOpt.c C/Threads.c )
|
2016-02-06 02:19:29 +00:00
|
|
|
else()
|
2014-04-27 10:05:40 +00:00
|
|
|
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_7ZIP_ST" )
|
2016-02-06 02:19:29 +00:00
|
|
|
endif()
|
2009-03-10 23:07:37 +00:00
|
|
|
|
2019-05-15 14:58:28 +00:00
|
|
|
add_library( lzma STATIC ${LZMA_FILES} )
|
2009-03-10 23:07:37 +00:00
|
|
|
target_link_libraries( lzma )
|