In a project I am generating a VTK module with vtk_module_add_module(), to be built from a number of source files, and also to be linked with other modules with vtk_module_link(): one other self-built module, plus some Qt5 components (Qt5::Widgets etc.). So far so good.
But then I also need to link in a library of which I have just a header (.h) and library (.lib) file (yes, this is just for Windows).
If I try to achieve this using target_link_directories() and target_link_libraries(), I get an error message from both: “…can not be used on ALIAS target”.
Well, nice - I would need to call these with the “real” targets - but which are these? I am using a name with some prefix, like NNN::xyz.
So how do I get the “real name” for which NNN::xyz is only an alias?
Or else: Is there another way to add this lib file to the module? The code is actually used internally only, so any interface to other modules goes through my own functions.