Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hwhsu1231 opened this issue Aug 15, 2022 · 0 comments
Open

Comments

@hwhsu1231
Copy link

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?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant