title: Linking ZBar library in CMakeFile
body: <p>I want to scan QR code live with Raspberry Pi and its cam module. I am going use zbar, opencv with C++. I already installed zbar, opencv and testing of camera is working. I don't know how to link to zbar library in CMakeLists.txt . In general, I don't know how to link a library in CMake. The following text is from CMakeList.txt. </p>
  
  <pre><code>find_package(raspicam REQUIRED)
  find_package(OpenCV)
  IF  ( OpenCV_FOUND AND raspicam_CV_FOUND)
  MESSAGE(STATUS "COMPILING OPENCV TESTS")
  add_executable (main  main.cpp)
  target_link_libraries (main ${raspicam_CV_LIBS}${ZBAR_LIBRARIES}zbar)
  SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} /usr/local/lib/cmake/)
  ELSE()
  MESSAGE(FATAL_ERROR "OPENCV NOT FOUND IN YOUR SYSTEM")
  ENDIF()
  </code></pre>
  
  <p>I am having error</p>
  
  <pre><code>Linking CXX executable main
  /usr/bin/ld: cannot find -lraspicam_cvzbar
  collect2: ld returned 1 exit status
  make[2]: *** [main] Error 1
  make[1]: *** [CMakeFiles/main.dir/all] Error 2
  make: *** [all] Error 2
  </code></pre>
  
  <p>Please tell me how to link zbar library in Raspberry PI or how to solve this problem?</p>