[CMake] for loop won't locate libs
Michael Jackson
mike.jackson at bluequartz.net
Thu Jun 4 15:01:04 EDT 2009
_________________________________________________________
Mike Jackson mike.jackson at bluequartz.net
BlueQuartz Software www.bluequartz.net
Principal Software Engineer Dayton, Ohio
On Jun 4, 2009, at 1:22 PM, eial at 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)
>
How about the following:
SET(LIBS AR ARMulti ARvideo)
FOREACH (LIB ${LIBS})
FIND_LIBRARY(${LIB}_LIBRARY ${LIB} /usr/lib /usr/local/lib)
SET(ARTK_LIBRARYS ${ARTK_LIBRARYS} ${${LIB}_LIBRARY})
message(STATUS "${LIB}_LIBRARY: ${${LIB}_LIBRARY}")
ENDFOREACH(LIB)
MJ.
More information about the CMake
mailing list