Pangolin
Pangolin copied to clipboard
[suggest] Provide `<pkg>::<comp>` Imported Targets with `pango::` namespace.
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?