pollymc/libraries/xz-embedded/CMakeLists.txt

27 lines
910 B
CMake
Raw Normal View History

2022-03-19 22:38:28 +05:30
cmake_minimum_required(VERSION 3.9.4)
2015-09-29 00:23:46 +05:30
project(xz-embedded LANGUAGES C)
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)
# See include/xz.h for manual feature configuration
# tweak this list and xz.h to fit your needs
set(XZ_SOURCES
2018-07-15 18:21:05 +05:30
src/xz_crc32.c
src/xz_crc64.c
src/xz_dec_lzma2.c
src/xz_dec_stream.c
# src/xz_dec_bcj.c
)
2013-09-30 00:41:30 +05:30
add_library(xz-embedded STATIC ${XZ_SOURCES})
2015-09-29 00:23:46 +05:30
target_include_directories(xz-embedded PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
set_property(TARGET xz-embedded PROPERTY C_STANDARD 99)
if(${XZ_BUILD_MINIDEC})
2018-07-15 18:21:05 +05:30
add_executable(xzminidec xzminidec.c)
target_link_libraries(xzminidec xz-embedded)
set_property(TARGET xzminidec PROPERTY C_STANDARD 99)
2015-09-29 00:23:46 +05:30
endif()