[cmake-developers] Handling of Config specific imported targets?
Brad King
brad.king at kitware.com
Thu May 17 09:56:38 EDT 2012
On 05/17/2012 09:41 AM, Stephen Kelly wrote:
> Great, so choosing the correct imported configuration a solved problem. I'll
> point the documentation in of the Qt 5 CMake stuff to that so.
Note that MAP_IMPORTED_CONFIG_<CONFIG> should not be set by package
configuration files. It should only be set in the CMakeLists.txt files
of the project *loading* them. Only the application knows its own list
of configurations. The documentation of the package should list the
valid configurations to which one may map.
> Am I right that it is appropriate to create imported targets without a
> _${Config} though?
It shouldn't be necessary to create the non-config one. If only
IMPORTED_LOCATION_DEBUG and IMPORTED_LOCATION_RELEASE are set and not
IMPORTED_LOCATION then the default behavior will still choose one of
the available configurations. Just be sure to list all the available
configurations in IMPORTED_CONFIGURATIONS.
-Brad
More information about the cmake-developers
mailing list