Not the prettiest CMakeLists.txt, but it builds...

will want to bring over some options from the zstd Makefile (or decide
this is a terrible idea and bail out)
This commit is contained in:
sz 2020-08-21 23:45:33 -05:00
parent 5d1fd05ebd
commit 74cad11d24
5 changed files with 22 additions and 0 deletions

View File

@ -46,6 +46,7 @@ set (PROJECTS
src/third_party_lib/libcorrect src/third_party_lib/libcorrect
src/third_party_lib/libpopcnt src/third_party_lib/libpopcnt
src/third_party_lib/wirehair src/third_party_lib/wirehair
src/third_party_lib/zstd
) )
include_directories( include_directories(

View File

@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 2.8)
project(zstd C)
add_subdirectory(common)
add_subdirectory(compress)
add_subdirectory(decompress)
set(zstd_obj_files $<TARGET_OBJECTS:zstd-common> $<TARGET_OBJECTS:zstd-compress> $<TARGET_OBJECTS:zstd-decompress>)
add_library(zstd ${zstd_obj_files})

View File

@ -0,0 +1,3 @@
set(SRCFILES bitstream.h compiler.h debug.c entropy_common.c error_private.h fse.h mem.h pool.h threading.h xxhash.h zstd_errors.h
cpu.h debug.h error_private.c fse_decompress.c huf.h pool.c threading.c xxhash.c zstd_common.c zstd_internal.h)
add_library(zstd-common OBJECT ${SRCFILES})

View File

@ -0,0 +1,5 @@
set(SRCFILES huf_compress.c zstd_compress_literals.h zstd_compress_superblock.h zstd_fast.c zstd_ldm.c zstd_opt.c
fse_compress.c zstd_compress.c zstd_compress_sequences.c zstd_cwksp.h zstd_fast.h zstd_ldm.h zstd_opt.h
hist.c zstd_compress_internal.h zstd_compress_sequences.h zstd_double_fast.c zstd_lazy.c zstdmt_compress.c
hist.h zstd_compress_literals.c zstd_compress_superblock.c zstd_double_fast.h zstd_lazy.h zstdmt_compress.h)
add_library(zstd-compress OBJECT ${SRCFILES})

View File

@ -0,0 +1,2 @@
set(SRCFILES huf_decompress.c zstd_ddict.c zstd_ddict.h zstd_decompress_block.c zstd_decompress_block.h zstd_decompress.c zstd_decompress_internal.h)
add_library(zstd-decompress OBJECT ${SRCFILES})