Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

OpenCV CMake package version error

📅 2017-Dec-23 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ cmake, error, opencv ⬩ 📚 Archive

Problem

I was compiling OpenCV using CMake and it threw up this error:

CMake Warning at cmake/OpenCVPackaging.cmake:23 (message):
  CPACK_PACKAGE_VERSION does not match version provided by version.hpp
  header!
Call Stack (most recent call first):
  CMakeLists.txt:1105 (include)

Solution

Open cmake/OpenCVPackaging.cmake file and add the version of OpenCV using a line set(OPENCV_VCSVERSION "2.4.13"). Place the line anywhere above the first use of OPENCV_VCSVERSION.


© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧