Skip to content

Cannot configure with Cmake on Ubuntu Linux #10

Description

@GoogleCodeExporter
What steps will reproduce the problem?
1.already done everything on muct.
2.cmake
3.

What is the expected output? What do you see instead?
according to the guide, nothing should be modified to configure with cmake. 
However I saw this.
CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:16 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_core" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  annotation/CMakeLists.txt:4 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:19 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_flann" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  annotation/CMakeLists.txt:4 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:22 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_imgproc" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  annotation/CMakeLists.txt:4 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:25 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_highgui" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  annotation/CMakeLists.txt:4 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:28 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_features2d" because
  another target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  annotation/CMakeLists.txt:4 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:31 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_calib3d" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  annotation/CMakeLists.txt:4 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:34 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_ml" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  annotation/CMakeLists.txt:4 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:37 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_video" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  annotation/CMakeLists.txt:4 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:40 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_legacy" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  annotation/CMakeLists.txt:4 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:43 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_objdetect" because
  another target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  annotation/CMakeLists.txt:4 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:46 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_photo" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  annotation/CMakeLists.txt:4 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:49 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_gpu" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  annotation/CMakeLists.txt:4 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:52 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_ocl" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  annotation/CMakeLists.txt:4 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:55 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_nonfree" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  annotation/CMakeLists.txt:4 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:58 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_contrib" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  annotation/CMakeLists.txt:4 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:61 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_stitching" because
  another target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  annotation/CMakeLists.txt:4 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:64 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_superres" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  annotation/CMakeLists.txt:4 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:67 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_ts" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  annotation/CMakeLists.txt:4 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:70 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_videostab" because
  another target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  annotation/CMakeLists.txt:4 (FIND_PACKAGE)


Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:16 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_core" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  demo/CMakeLists.txt:2 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:19 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_flann" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  demo/CMakeLists.txt:2 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:22 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_imgproc" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  demo/CMakeLists.txt:2 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:25 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_highgui" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  demo/CMakeLists.txt:2 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:28 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_features2d" because
  another target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  demo/CMakeLists.txt:2 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:31 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_calib3d" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  demo/CMakeLists.txt:2 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:34 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_ml" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  demo/CMakeLists.txt:2 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:37 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_video" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  demo/CMakeLists.txt:2 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:40 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_legacy" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  demo/CMakeLists.txt:2 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:43 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_objdetect" because
  another target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  demo/CMakeLists.txt:2 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:46 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_photo" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  demo/CMakeLists.txt:2 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:49 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_gpu" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  demo/CMakeLists.txt:2 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:52 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_ocl" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  demo/CMakeLists.txt:2 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:55 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_nonfree" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  demo/CMakeLists.txt:2 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:58 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_contrib" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  demo/CMakeLists.txt:2 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:61 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_stitching" because
  another target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  demo/CMakeLists.txt:2 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:64 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_superres" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  demo/CMakeLists.txt:2 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:67 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_ts" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  demo/CMakeLists.txt:2 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:70 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_videostab" because
  another target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  demo/CMakeLists.txt:2 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:16 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_core" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  lib/CMakeLists.txt:3 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:19 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_flann" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  lib/CMakeLists.txt:3 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:22 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_imgproc" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  lib/CMakeLists.txt:3 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:25 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_highgui" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  lib/CMakeLists.txt:3 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:28 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_features2d" because
  another target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  lib/CMakeLists.txt:3 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:31 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_calib3d" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  lib/CMakeLists.txt:3 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:34 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_ml" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  lib/CMakeLists.txt:3 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:37 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_video" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  lib/CMakeLists.txt:3 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:40 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_legacy" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  lib/CMakeLists.txt:3 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:43 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_objdetect" because
  another target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  lib/CMakeLists.txt:3 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:46 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_photo" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  lib/CMakeLists.txt:3 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:49 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_gpu" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  lib/CMakeLists.txt:3 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:52 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_ocl" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  lib/CMakeLists.txt:3 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:55 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_nonfree" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  lib/CMakeLists.txt:3 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:58 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_contrib" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  lib/CMakeLists.txt:3 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:61 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_stitching" because
  another target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  lib/CMakeLists.txt:3 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:64 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_superres" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  lib/CMakeLists.txt:3 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:67 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_ts" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  lib/CMakeLists.txt:3 (FIND_PACKAGE)


CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:70 (ADD_LIBRARY):
  add_library cannot create imported target "opencv_videostab" because
  another target with the same name already exists.
Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:44 (include)
  lib/CMakeLists.txt:3 (FIND_PACKAGE)

What version of the product are you using? On what operating system?
The latest version. Ubuntu 12.04 64-bit.

Please provide any additional information below.
I think this is because I have already installed opencv but what should I do?

Original issue reported on code.google.com by leonzh...@gmail.com on 21 Jan 2014 at 2:57

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions