Hi all,
I’m trying to get my project, which has a non-CMake-target dependency, to link its dependency publically:
target_link_libraries(MyLibrary
PUBLIC
$<BUILD_INTERFACE:${MyDependency}>
$<INSTALL_INTERFACE:lib/libMyDependency.so>
)
This builds and links MyLibrary without issue, but MyLibrary.config comes out wrong:
set_target_properties(MyPackage::MyLibrary PROPERTIES
...
INTERFACE_LINK_LIBRARIES "MyPackage::MyCMakeDependency;lib/libMyDependency.so"
...
)
I would’ve expected lib/libMyDependency.so
to be prefixed with ${_IMPORT_PREFIX}
in the same way that my interface include directories are. Any thoughts on what I’m doing wrong here?
Thanks!