2013-09-28 22:13:30 +05:30
|
|
|
cmake_minimum_required(VERSION 2.6)
|
|
|
|
project(xz-embedded)
|
|
|
|
|
|
|
|
option(XZ_BUILD_BCJ "Build xz-embedded with BCJ support (native binary optimization)" OFF)
|
|
|
|
option(XZ_BUILD_CRC64 "Build xz-embedded with CRC64 checksum support" ON)
|
2013-09-30 00:41:30 +05:30
|
|
|
option(XZ_BUILD_MINIDEC "Build a tiny utility that decompresses xz streams" OFF)
|
2013-09-28 22:13:30 +05:30
|
|
|
|
|
|
|
set(CMAKE_C_FLAGS "-std=c99")
|
|
|
|
|
|
|
|
include_directories(include)
|
2014-04-06 23:13:09 +05:30
|
|
|
set(XZ_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include" PARENT_SCOPE)
|
2013-09-30 06:04:46 +05:30
|
|
|
|
|
|
|
# See include/xz.h for manual feature configuration
|
|
|
|
# tweak this list and xz.h to fit your needs
|
2013-09-28 22:13:30 +05:30
|
|
|
|
|
|
|
set(XZ_SOURCES
|
2014-04-09 19:11:49 +05:30
|
|
|
include/xz.h
|
|
|
|
src/xz_config.h
|
|
|
|
src/xz_crc32.c
|
|
|
|
src/xz_crc64.c
|
|
|
|
src/xz_dec_lzma2.c
|
|
|
|
src/xz_dec_stream.c
|
|
|
|
src/xz_lzma2.h
|
|
|
|
src/xz_private.h
|
|
|
|
src/xz_stream.h
|
|
|
|
# src/xz_dec_bcj.c
|
2013-09-28 22:13:30 +05:30
|
|
|
)
|
2013-09-30 00:41:30 +05:30
|
|
|
# TODO: look into what would be needed for plain old lzma
|
2013-09-28 22:13:30 +05:30
|
|
|
|
2013-09-30 00:41:30 +05:30
|
|
|
add_library(xz-embedded STATIC ${XZ_SOURCES})
|
2013-09-28 22:13:30 +05:30
|
|
|
add_executable(xzminidec xzminidec.c)
|
|
|
|
target_link_libraries(xzminidec xz-embedded)
|