I have a precompiled libary that also employes dynamically loaded plugins.
- Library L (compoesd ba a library.lib and library.dll)
- Plugin P (composed only by a plugin.dll)
I am defining the imported target of L as:
add_library(L SHARED IMPORTED)
set_target_properties(L PROPERTIES
IMPORTED_LOCATION_RELEASE library.dll
IMPLIB_LOCATION_RELEASE library.lib
)
set_target_properties(L PROPERTIES
INTERFACE_LINK_LIBRARIES P
)
How do I define the imported target for P and its properties?
If I define it as:
add_library(P MODULE IMPORTED)
set_target_properties(P PROPERTIES
IMPORTED_LOCATION_RELEASE plugin.dll
)
Then the generated projects using L will erroneously consider plugin.dll as the lib to be linked. I would like instead to keep the dependency (so that I can transitively install plugin.dll) but avoid L to link target P