On Thu, Jun 04, 2009 at 08:22:32PM +0300, e...@cs.bgu.ac.il wrote:
> 
> On Thu 04 Jun 20:16 2009 Tyler Roscoe wrote:
> > On Thu, Jun 04, 2009 at 07:50:08PM +0300, e...@cs.bgu.ac.il wrote:
> > > SET(LIBS AR ARMulti ARvideo)
> > > FOREACH (LIB ${LIBS})
> > >    SET(FOUND_LIB)
> > >    FIND_LIBRARY(LIB_FOUND ${LIB} /usr/lib /usr/local/lib) 
> > >    SET(ARTK_LIBRARY ${ARTK_LIBRARY} ${LIB_FOUND})
> > > ENDFOREACH(LIB)
> > > 
> > > the result is /usr/lib64/libAR.a/usr/lib64/libAR.a/usr/lib64/libAR.a when 
> > > it should be /usr/lib64/libAR.a /usr/lib64/libARMulti.a 
> > > /usr/lib64/libARvideo.a
> > 
> > What's up with set(FOUND_LIB)?
> > 
> > You might be running into a quoting/list expansion problem. Try:
> > SET(ARTK_LIBRARY "${ARTK_LIBRARY}" "${LIB_FOUND}")
> > 
> > or use list(APPEND ...) instead.
> > 
> > tyler
> > 
> 
> apparently, FOUND_LIB isn't being cleaned in each loop, that is for cleaning.

You reference both FOUND_LIB and LIB_FOUND in that snippet, so maybe
that's what your problem is?

> my problem is that the loop finds only the first lib's file but not
> the rest, look at the output result that I've posted.

I thought the problem was that the libs are all mushed together. I guess
you have a lot of problems over there.

tyler
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to