-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Halide integration doesn't work with recent versions (10+) #20353
Copy link
Copy link
Closed
Milestone
Description
OpenCVDetectHalide.cmake assumes variables are set by the Halide CMake package that it does not (has never?).
opencv/cmake/OpenCVDetectHalide.cmake
Lines 9 to 16 in 167bac2
| if(NOT HAVE_HALIDE) | |
| find_package(Halide QUIET) # Try CMake-based config files | |
| if(Halide_FOUND) | |
| set(HALIDE_INCLUDE_DIRS "${Halide_INCLUDE_DIRS}" CACHE PATH "Halide include directories" FORCE) | |
| set(HALIDE_LIBRARIES "${Halide_LIBRARIES}" CACHE PATH "Halide libraries" FORCE) | |
| set(HAVE_HALIDE TRUE) | |
| endif() | |
| endif() |
As a result, attempting to build against a recent version of Halide incorrectly succeeds during configuration only to fail to find Halide.h during the build.
Locally, I found that replacing the contents of cmake/OpenCVDetectHalide.cmake with the following works at least as far as the build succeeding:
find_package(Halide REQUIRED)
set(HAVE_HALIDE TRUE)
set(HALIDE_LIBRARIES Halide::Halide)
list(APPEND OPENCV_LINKER_LIBS ${HALIDE_LIBRARIES})
Reactions are currently unavailable