Skip to content

[suggest] Provide <pkg>::<comp> Imported Targets with pango:: namespace. #787

Open
@hwhsu1231

Description

@hwhsu1231

For example:

  • pango::core
  • pango::display
  • pango::geometry
  • pango::glgeometry
  • pango::image
  • pango::opengl
  • ...etc

While the syntax :: seems to be more modern and conventional in CMake, it has an obvious benefit.

If we try to use an IMPORTED target pango::display but forget to add it as a COMPONENT in find_package(). (BTW, I also hope that Pangolin introduce this kind of usage, like Qt, Boost, and Poco...etc)

find_package(Pangolin REQUIRED COMPONENTS core)
target_link_libraries(myEXE pango::core pango::display)

Then, CMake will report a FATAL_ERROR message according to the policy CMP0028.

Target "myExe" links to target "pango::display" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?

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