See https://bugzilla.redhat.com/show_bug.cgi?id=1479023 Version 1.12.0 prevents compilation of opencv with contrib and contrib_dnn flags. CMake Error at /usr/lib64/cmake/Ceres/CeresConfig.cmake:89 (else): A duplicate ELSE command was found inside an IF block. Call Stack (most recent call first): /usr/lib64/cmake/Ceres/CeresConfig.cmake:217 (ceres_report_not_found) /var/tmp/portage/media-libs/opencv-3.4.1-r5/work/opencv_contrib-3.4.1/modules/sfm/CMakeLists.txt:8 (find_package) Either backporting the fix (see fedora) or bumping version should solve this.
Fixed in 1.14 then.