[CMake] assert macro problem

dfeustel at mindspring.com dfeustel at mindspring.com
Thu Apr 19 08:40:13 EDT 2007


I do not see why libjpeg.a is not found by
find_library? What am I missing?

Thanks,
Dave Feustel


# from page 37 of _Mastering CMake_, 2nd edition

macro(ASSERT test comment)
  if (NOT ${test})
    message ("Assertion failed: ${comment}")
  endif (NOT ${test})
endmacro(ASSERT)

find_library(MYLIB libjpeg /usr/local/lib)
ASSERT(${MYLIB} "lib jpeg not found")
#find /usr/local/lib -name '*jpeg*'
#/usr/local/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-jpeg.a
#/usr/local/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-jpeg.la
#/usr/local/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-jpeg.so
#/usr/local/lib/libjpeg.a
#/usr/local/lib/libjpeg.la
#/usr/local/lib/libjpeg.so.62.0
#/usr/local/lib/kde3/kfile_jpeg.la
#/usr/local/lib/kde3/kfile_jpeg.so


More information about the CMake mailing list