Hello,
Is it possible to change a package export target’s name?
For example, if foo is my target to create a library I understand that
install(TARGETS foo EXPORT foo_targets ...)
Will cause files:
fooTargets.cmake
fooTargets-<CONFIG>.cmake
to be generated.
This causes logic inside these files such as:
fooTargets.cmake:add_library(foo STATIC IMPORTED)
The problem is, we’ve us the target property OUTPUT_NAME
on foo
. So while foo
is the target, the generated library would be bar.lib
, etc.
My team wants their package searches to be for bar
since that’s the library name, and there are reasons that the target cannot simply be bar
.
What can you teach me for resolving this problem?
Thank you.