You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CMakeDeps creates IMPORTED library targets, but for application packages or packages containing applications, it does not create IMPORTED executable targets. This is unfortunate, because while in the CMake project which builds the executable, the target name can be used in a custom target: add_custom_target(my_target my::app) and the name of the application binary cannot. When the package is found via the script generated by CMakeDeps, this is reversed; the application binary is in path, but no target is created. This is particularly problematic for CMake scripts that make use of the application and should be usable in both contexts.
I would like to have some way to specify the name of a CMake IMPORTED executable target for a particular binary in a Conan package.
Have you read the CONTRIBUTING guide?
I've read the CONTRIBUTING guide
The text was updated successfully, but these errors were encountered:
This would be a duplicate request, we have already very recently started an effort to provide this, see this PR: #16964
The original request would be #7240, I think this might be closed as duplicated and progress can be followed up there.
This is particularly problematic for CMake scripts that make use of the application and should be usable in both contexts.
Note however that this will probably require some special treatment, as if targets are generated for the "host" context, they will fail to execute in many scenarios, like cross-building, so the targets from the "build" context should generally be the ones to be prioritized.
What is your suggestion?
CMakeDeps
createsIMPORTED
library targets, but for application packages or packages containing applications, it does not createIMPORTED
executable targets. This is unfortunate, because while in the CMake project which builds the executable, the target name can be used in a custom target:add_custom_target(my_target my::app)
and the name of the application binary cannot. When the package is found via the script generated byCMakeDeps
, this is reversed; the application binary is in path, but no target is created. This is particularly problematic for CMake scripts that make use of the application and should be usable in both contexts.I would like to have some way to specify the name of a CMake
IMPORTED
executable target for a particular binary in a Conan package.Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: