[cmake-developers] Support for imported targets in CMAKE_REQUIRED_LIBRARIES

Brad King brad.king at kitware.com
Thu Feb 16 08:21:45 EST 2012


On 2/16/2012 6:32 AM, Alexander Neundorf wrote:
> Done, and pushed to stage.
> I added the prefix "cmake_" to the function, and added a test for it.

Looks good, thanks.

However now that I look at the end result I realize that the functionality
is not specific to CMAKE_REQUIRED_LIBRARIES at all.  It is a general
conversion from imported targets to raw file paths.  Perhaps the name
and interface could be made more general:

   include(CMakeExpandImportedTargets)
   cmake_expand_imported_targets(result LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})

-Brad



More information about the cmake-developers mailing list