Added LINK_LIBRARIES(jpeg) to CMakeLists because of linking error to jpeg.