Skip to content

Instructions for building with zlib-ng not working on Windows #603

@triplef

Description

@triplef

According to the Wiki documentation, building with zlib-ng requires specifying ZLIB_REPOSITORY and ZLIB_TAG with CMake. This does not seem to be working for me (tested on Windows with CMake 3.21.21080301-MSVC_2).

Instead the variables that need to be defined are zlib_REPOSITORY and zlib_TAG, because the "zlib" parameter passed to clone_repo, which is used to create these variable names, is lowercase:

clone_repo(zlib https://github.com/madler/zlib)

With this the library is fetched correctly. This should be fixed either in CMakeLists.txt or the Wiki.

-- Fetching zlib https://github.com/zlib-ng/zlib-ng 2.0.6
-- Using CMake version 3.21.21080301-MSVC_2
-- ZLIB_HEADER_VERSION: 1.2.11
-- ZLIBNG_HEADER_VERSION: 2.0.6

However, even when passing these arguments I’m getting the following error:

-- The following OPTIONAL packages have not been found:

 * ZLIB

-- Using CryptoAPI
CMake Error at CMakeLists.txt:733 (install):
  install TARGETS given target "zlibstatic" which is an alias.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions