cmake_minimum_required(VERSION 3.10) project(zlib VERSION 1.3.1.1 LANGUAGES C) file(GLOB SRC_FILES "${CMAKE_CURRENT_SOURCE_DIR}/zlib/*.c") add_library(zlib STATIC ${SRC_FILES}) target_include_directories(zlib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) add_library(ZLIB::ZLIB ALIAS zlib) install(TARGETS zlib EXPORT zlib)