Build of opencv4 for c++ using cmake failing after upgrading to macOS Catalina

hi I am trying to build opencv4 from source using cmake (following https://thecodinginterface.com/blog/opencv-cpp-vscode/). I updated my macOS to 10.15 and installed the latest xcode. I git cloned repositories and make a build directory as below and I then try to configure cmake:

$ mkdir opencv
$ cd opencv
$ git clone https://github.com/opencv/opencv.git
$ cd opencv
$ git checkout tags/4.2.0
$ cd ..
$ git clone https://github.com/opencv/
$ cd opencv_contrib 
$ git checkout tags/4.2.0
$ cd ..


$ cd build_opencv
$ cmake -D CMAKE_BUILD_TYPE=RELEASE \
      -D CMAKE_INSTALL_PREFIX=../install \
      -D INSTALL_C_EXAMPLES=ON \
      -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules \
      -D BUILD_EXAMPLES=ON ../opencv

I get the below errors and it seems that it's trying to find this non-existent path:

"/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework"

I have updated my mac version to 10.15 but it seems to be searching for a path under MacOSX10.14. I've looked online but I can't seem to find any suggestions?

CMake Error in /usr/local/include/opencv/build_opencv/CMakeFiles/CMakeTmp/CMakeLists.txt:
  Imported target "VTK::RenderingOpenGL2" includes non-existent path

    "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Error in /usr/local/include/opencv/build_opencv/CMakeFiles/CMakeTmp/CMakeLists.txt:
  Imported target "VTK::RenderingOpenGL2" includes non-existent path

    "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Error in /usr/local/include/opencv/build_opencv/CMakeFiles/CMakeTmp/CMakeLists.txt:
  Imported target "VTK::RenderingOpenGL2" includes non-existent path

    "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Error at cmake/OpenCVDetectVTK.cmake:73 (try_compile):
  Failed to generate test project build system.
Call Stack (most recent call first):
  CMakeLists.txt:767 (include)


-- Configuring incomplete, errors occurred!


from Recent Questions - Stack Overflow https://ift.tt/2Tt0f9a
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

Spring Elasticsearch Operations

Network Error and Timeout on Authorize.net JS

Object oriented programming concepts (OOPs)