Skip to content

Fix the output name of the debug shared library on Windows #273

@na-Itms

Description

@na-Itms

When building the shared Windows libraries, there is an issue with the debug DLL (and an inconsistency with the .lib file names, which is less important).

The debug DLL is zlibd1.dll, which is meaningless: it should be zlib1d.dll.

As far as I understand, this could be fixed by replacing in CMakeLists.txt the following code

elseif(BUILD_SHARED_LIBS AND WIN32)
    # Creates zlib1.dll when building shared library version
    set_target_properties(zlib PROPERTIES SUFFIX "1.dll")
endif()

by

elseif(BUILD_SHARED_LIBS AND WIN32)
    # Creates zlib1.dll when building shared library version
    set_target_properties(zlib PROPERTIES OUTPUT_NAME "zlib1")
endif()

This has the side-effect that static libs get the 1 in their file names, but as far as I can tell this fixes an inconsistency.

If you agree this is a desirable change, I can submit a pull request. I noticed the old #66 but I don't understand what it tried to achieve and it doesn't fix my issue with the debug DLL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions