[CMake] Searching for multiple libraries using find_library()

Robert Dailey rcdailey at gmail.com
Sun May 17 23:42:51 EDT 2009


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>?
Right now as a work around I'm using find_path() on tbb.lib, and then
manually appending each filename to that directory and creating my list that
way. This is still not good enough because I do not verify if the libraries
actually exist.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090517/ac4e707e/attachment.htm>


More information about the CMake mailing list