Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
otb
otb
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 307
    • Issues 307
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 16
    • Merge Requests 16
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Main Repositories
  • otbotb
  • Merge Requests
  • !725

Merged
Created Jul 20, 2020 by Cédric Traizet@ctraizetDeveloper

Fix superbuild with OpenCV4

  • Overview 0
  • Commits 1
  • Pipelines 2
  • Changes 1

Summary

This merge request fixes Superbuild when OpenCV is used.

Rationale

Compiling the Superbuild with OpenCV leads to the following error :

CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find OpenCV (missing: OPENCV_core_LIBRARY) (found version
  "4.1.1")

See issue #2079 (closed) for an example.

In the superbuild the OPENCV_DIR variable is set to ${SB_INSTALL_PREFIX}/share/OpenCV. However this directory does not exist in a OpenCV 4 build.

This line is not needed, as otb is able to find OTB in ${SB_INSTALL_PREFIX} (which is in the CMake search path). The FindOpenCV.cmake script will look for openCV includes in ${SB_INSTALL_PREFIX}/opencv4/opencv2 and the lib are built in ${SB_INSTALL_PREFIX}/lib.

Note that the bug does not appear on CI as the builds are executed in two parts. First the dependencies are built using the OTB_DEPENDS target and then OTB is built independently. The Superbuild is never executed entirely.

Copyright

The copyright owner is CNES and has signed the ORFEO ToolBox Contributor License Agreement.


Check before merging:

  • All discussions are resolved
  • At least 2 👍 votes from core developers, no 👎 vote.
  • The feature branch is (reasonably) up-to-date with the base branch
  • Dashboard is green
  • Copyright owner has signed the ORFEO ToolBox Contributor License Agreement
  • Optionally, run git diff develop... -U0 --no-color | clang-format-diff.py -p1 -i on latest changes and commit
Edited Jul 20, 2020 by Cédric Traizet
Assignee
Assign to
Reviewer
Request review from
7.2.0
Milestone
7.2.0
Assign milestone
Time tracking
Source branch: opencv4_superbuild