[CMake] Searching for multiple libraries using find_library()

Andreas Pakulat apaku at gmx.de
Mon May 18 02:50:07 EDT 2009


On 17.05.09 22:42:51, Robert Dailey wrote:
> I'm creating a find_package module for the TBB library, and it has 2 libs:
> tbb.lib and tbbmalloc.lib. Both of these are part of TBB, and in my
> TBB_LIBRARIES variable I want to return both of them. However, I can only
> search for one of them at a time using find_library(). Is there a way to
> make it search for more than one at once and store the results as a list in
> <var>?

AFAIK, no. The usual way to do this is simply using find_library(
TBB_LIBRARY tbb ) and additionally find_library( TBBMALLOC_LIBRARY
tbbmalloc) and then produce the _LIBRARIES variable by putting the two
together.

Andreas

-- 
You are not dead yet.  But watch for further reports.


More information about the CMake mailing list