cmake_minimum_required(VERSION 2.6...3.29)
project(zlib)

set(ZLIB_SOURCES
    adler32.c
    compress.c
    crc32.c
    deflate.c
    gzclose.c
    gzlib.c
    gzread.c
    gzwrite.c
    inflate.c
    infback.c
    inftrees.c
    inffast.c
    trees.c
    uncompr.c
    zutil.c
)
file(GLOB_RECURSE ZLIB_HEADERS *.h)

add_library(zlib STATIC ${ZLIB_SOURCES} ${ZLIB_HEADERS}) # remove static, cmake should take care of that
target_include_directories(zlib PUBLIC ${ZLIB_HEADERS})

set_target_properties(zlib PROPERTIES FOLDER deps)
