Skip to content

[libpng] usage as indicated in usage file may result in system library being prefered over vcpkg version #51421

@ccptoebeans

Description

@ccptoebeans

Is your feature request related to a problem? Please describe.

https://github.com/microsoft/vcpkg/blob/master/ports/libpng/usage

libpng provides CMake targets:

  find_package(PNG REQUIRED)
  target_link_libraries(main PRIVATE PNG::PNG)

The above usage information for libpng is risky. If the user has a local PNG installation, cmakes FindPNG module will prefer that package over the VCPKG one.

Proposed solution

Usage must be changed to:

libpng provides CMake targets:

  find_package(libpng CONFIG REQUIRED)
  target_link_libraries(main PRIVATE PNG::PNG)

Metadata

Metadata

Assignees

No one assigned

    Labels

    category:port-featureThe issue is with a library, which is requesting new capabilities that didn’t exist

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions