mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
This commit is contained in:
commit
d60bb57d4b
@ -179,7 +179,13 @@ if(CV_GCC OR CV_CLANG)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# We need pthread's
|
# We need pthread's
|
||||||
if(UNIX AND NOT ANDROID AND NOT (APPLE AND CV_CLANG)) # TODO
|
if((UNIX
|
||||||
|
AND NOT ANDROID
|
||||||
|
AND NOT (APPLE AND CV_CLANG)
|
||||||
|
AND NOT EMSCRIPTEN
|
||||||
|
)
|
||||||
|
OR (EMSCRIPTEN AND WITH_PTHREADS_PF) # https://github.com/opencv/opencv/issues/20285
|
||||||
|
)
|
||||||
add_extra_compiler_option(-pthread)
|
add_extra_compiler_option(-pthread)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -9,9 +9,14 @@ set(HALIDE_ROOT_DIR "${HALIDE_ROOT_DIR}" CACHE PATH "Halide root directory")
|
|||||||
if(NOT HAVE_HALIDE)
|
if(NOT HAVE_HALIDE)
|
||||||
find_package(Halide QUIET) # Try CMake-based config files
|
find_package(Halide QUIET) # Try CMake-based config files
|
||||||
if(Halide_FOUND)
|
if(Halide_FOUND)
|
||||||
set(HALIDE_INCLUDE_DIRS "${Halide_INCLUDE_DIRS}" CACHE PATH "Halide include directories" FORCE)
|
if(TARGET Halide::Halide) # modern Halide scripts defines imported target
|
||||||
set(HALIDE_LIBRARIES "${Halide_LIBRARIES}" CACHE PATH "Halide libraries" FORCE)
|
set(HALIDE_INCLUDE_DIRS "")
|
||||||
set(HAVE_HALIDE TRUE)
|
set(HALIDE_LIBRARIES "Halide::Halide")
|
||||||
|
set(HAVE_HALIDE TRUE)
|
||||||
|
else()
|
||||||
|
# using HALIDE_INCLUDE_DIRS / Halide_LIBRARIES
|
||||||
|
set(HAVE_HALIDE TRUE)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -28,18 +33,15 @@ if(NOT HAVE_HALIDE AND HALIDE_ROOT_DIR)
|
|||||||
)
|
)
|
||||||
if(HALIDE_LIBRARY AND HALIDE_INCLUDE_DIR)
|
if(HALIDE_LIBRARY AND HALIDE_INCLUDE_DIR)
|
||||||
# TODO try_compile
|
# TODO try_compile
|
||||||
set(HALIDE_INCLUDE_DIRS "${HALIDE_INCLUDE_DIR}" CACHE PATH "Halide include directories" FORCE)
|
set(HALIDE_INCLUDE_DIRS "${HALIDE_INCLUDE_DIR}")
|
||||||
set(HALIDE_LIBRARIES "${HALIDE_LIBRARY}" CACHE PATH "Halide libraries" FORCE)
|
set(HALIDE_LIBRARIES "${HALIDE_LIBRARY}")
|
||||||
set(HAVE_HALIDE TRUE)
|
set(HAVE_HALIDE TRUE)
|
||||||
endif()
|
endif()
|
||||||
if(NOT HAVE_HALIDE)
|
|
||||||
ocv_clear_vars(HALIDE_LIBRARIES HALIDE_INCLUDE_DIRS CACHE)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(HAVE_HALIDE)
|
if(HAVE_HALIDE)
|
||||||
include_directories(${HALIDE_INCLUDE_DIRS})
|
if(HALIDE_INCLUDE_DIRS)
|
||||||
|
include_directories(${HALIDE_INCLUDE_DIRS})
|
||||||
|
endif()
|
||||||
list(APPEND OPENCV_LINKER_LIBS ${HALIDE_LIBRARIES})
|
list(APPEND OPENCV_LINKER_LIBS ${HALIDE_LIBRARIES})
|
||||||
else()
|
|
||||||
ocv_clear_vars(HALIDE_INCLUDE_DIRS HALIDE_LIBRARIES)
|
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user