CMake: is there a way to get a list of imported package related goals

Sometimes I can get a list of imported goals that belong to a package. Is there a variable that holds them back?

This will allow me to write something like this

find_package(Qt5 CONFIG REQUIRED) message("Imported Qt5 targets: ${Qt5_IMPORTED_TARGETS}") # speculative code 

With my current knowledge, I have to rely on the package documentation to give me the names of all the imported targets. Reading them from a variable or property would be easier.

+5
source share

Source: https://habr.com/ru/post/1270527/


All Articles