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()
|
|
|
|
|
2013-06-23 16:37:13 +00:00
|
|
|
if( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
|
2011-06-12 19:17:21 +00:00
|
|
|
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fomit-frame-pointer" )
|
2013-06-23 16:37:13 +00:00
|
|
|
endif( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
|
2009-03-10 23:07:37 +00:00
|
|
|
|
|
|
|
set( LZMA_FILES
|
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
|
|
|
|
C/7zIn.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
|
|
|
|
C/CpuArch.c
|
|
|
|
C/LzFind.c
|
|
|
|
C/Lzma2Dec.c
|
|
|
|
C/LzmaDec.c
|
|
|
|
C/LzmaEnc.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 )
|