ci: fix Fedora mingw OpenCV include path
This commit is contained in:
@@ -15,6 +15,17 @@ endif()
|
|||||||
|
|
||||||
find_package(OpenCV REQUIRED COMPONENTS core imgproc imgcodecs)
|
find_package(OpenCV REQUIRED COMPONENTS core imgproc imgcodecs)
|
||||||
|
|
||||||
|
# Fedora MinGW OpenCV 4.13.0 may report an invalid include directory
|
||||||
|
# (//include/opencv4) from its OpenCVConfig.cmake. The headers are in the
|
||||||
|
# MinGW sysroot, so add a narrow cross-build fallback when CMake did not get a
|
||||||
|
# usable OpenCV include path from the package config.
|
||||||
|
if (MINGW AND (NOT OpenCV_INCLUDE_DIRS OR NOT EXISTS "${OpenCV_INCLUDE_DIRS}"))
|
||||||
|
set(_fedora_mingw_opencv_include "/usr/x86_64-w64-mingw32/sys-root/mingw/include/opencv4")
|
||||||
|
if (EXISTS "${_fedora_mingw_opencv_include}")
|
||||||
|
set(OpenCV_INCLUDE_DIRS "${_fedora_mingw_opencv_include}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
set(PROJECT_SOURCES
|
set(PROJECT_SOURCES
|
||||||
app/src/main.cpp
|
app/src/main.cpp
|
||||||
app/src/MainWindow.cpp
|
app/src/MainWindow.cpp
|
||||||
|
|||||||
Reference in New Issue
Block a user