Skip to content

Add options to explicitly include/exclude ZLIB and Iconv in the build #83

@tjwrona

Description

@tjwrona

The Conan package for this project has options for with_zlib and with_iconv that are supposed to explicitly enable or disable use of these libraries, but the main CMakeLists.txt does not directly support this.

I was trying to update the Conan package to the latest kaitai_struct_cpp_stl_runtime version (v0.11) and ran into an issue during the CI build on Mac OS because although with_zlib was set to false, the main CMakeLists.txt file was still pulling in ZLIB (which is installed by default on Mac OS) with find_package. When Conan went to create and test the package it failed to properly link because with_zlib was set to false in the conanfile.

For the time being I implemented a workaround in the Conanfile to get past the error:
conan-io/conan-center-index@76f9d9b

Ideally explicit CMake options for WITH_ZLIB and WITH_ICONV should be added to the main CMakeLists.txt file to make the declaration of these dependencies explicit and remove the need for a hacky workaround when packaging the project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions