opencv: update cuda_opt_flow.patch
This commit is contained in:
parent
2804657c2b
commit
044fd194e4
2 changed files with 26 additions and 25 deletions
|
@ -301,7 +301,7 @@ stdenv.mkDerivation {
|
|||
"-DCUDA_FAST_MATH=ON"
|
||||
"-DCUDA_HOST_COMPILER=${cudatoolkit.cc}/bin/cc"
|
||||
"-DCUDA_NVCC_FLAGS=--expt-relaxed-constexpr"
|
||||
"-DNVIDIA_OPTICAL_FLOW_1_0_HEADERS_PATH=${nvidia-optical-flow-sdk}"
|
||||
"-DNVIDIA_OPTICAL_FLOW_2_0_HEADERS_PATH=${nvidia-optical-flow-sdk}"
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
"-DWITH_OPENCL=OFF"
|
||||
"-DWITH_LAPACK=OFF"
|
||||
|
|
|
@ -1,26 +1,27 @@
|
|||
diff --git a/opencv_contrib/cudaoptflow/CMakeLists.txt b/opencv_contrib/cudaoptflow/CMakeLists.txt
|
||||
index e5b823ab4a..a728060d0b 100644
|
||||
--- a/opencv_contrib/cudaoptflow/CMakeLists.txt
|
||||
+++ b/opencv_contrib/cudaoptflow/CMakeLists.txt
|
||||
@@ -11,18 +11,6 @@ ocv_define_module(cudaoptflow opencv_video opencv_optflow opencv_cudaarithm open
|
||||
set(NVIDIA_OPTICAL_FLOW_1_0_HEADERS_COMMIT "79c6cee80a2df9a196f20afd6b598a9810964c32")
|
||||
set(NVIDIA_OPTICAL_FLOW_1_0_HEADERS_MD5 "ca5acedee6cb45d0ec610a6732de5c15")
|
||||
set(NVIDIA_OPTICAL_FLOW_1_0_HEADERS_PATH "${OpenCV_BINARY_DIR}/3rdparty/NVIDIAOpticalFlowSDK_1_0_Headers")
|
||||
-ocv_download(FILENAME "${NVIDIA_OPTICAL_FLOW_1_0_HEADERS_COMMIT}.zip"
|
||||
- HASH ${NVIDIA_OPTICAL_FLOW_1_0_HEADERS_MD5}
|
||||
- URL
|
||||
- "https://github.com/NVIDIA/NVIDIAOpticalFlowSDK/archive/"
|
||||
- DESTINATION_DIR "${NVIDIA_OPTICAL_FLOW_1_0_HEADERS_PATH}"
|
||||
- STATUS NVIDIA_OPTICAL_FLOW_1_0_HEADERS_DOWNLOAD_SUCCESS
|
||||
- ID "NVIDIA_OPTICAL_FLOW"
|
||||
- UNPACK RELATIVE_URL)
|
||||
|
||||
-if(NOT NVIDIA_OPTICAL_FLOW_1_0_HEADERS_DOWNLOAD_SUCCESS)
|
||||
- message(STATUS "Failed to download NVIDIA_Optical_Flow_1_0 Headers")
|
||||
-else()
|
||||
- add_definitions(-DHAVE_NVIDIA_OPTFLOW=1)
|
||||
- ocv_include_directories(SYSTEM "${NVIDIA_OPTICAL_FLOW_1_0_HEADERS_PATH}/NVIDIAOpticalFlowSDK-${NVIDIA_OPTICAL_FLOW_1_0_HEADERS_COMMIT}")
|
||||
diff --unified --recursive --text a/opencv_contrib/cudaoptflow/CMakeLists.txt b/opencv_contrib/cudaoptflow/CMakeLists.txt
|
||||
--- a/opencv_contrib/cudaoptflow/CMakeLists.txt 2021-06-12 01:35:47.536395972 +0300
|
||||
+++ b/opencv_contrib/cudaoptflow/CMakeLists.txt 2021-06-12 01:36:02.029498597 +0300
|
||||
@@ -12,19 +12,6 @@
|
||||
set(NVIDIA_OPTICAL_FLOW_2_0_HEADERS_COMMIT "edb50da3cf849840d680249aa6dbef248ebce2ca")
|
||||
set(NVIDIA_OPTICAL_FLOW_2_0_HEADERS_MD5 "a73cd48b18dcc0cc8933b30796074191")
|
||||
set(NVIDIA_OPTICAL_FLOW_2_0_HEADERS_PATH "${OpenCV_BINARY_DIR}/3rdparty/NVIDIAOpticalFlowSDK_2_0_Headers")
|
||||
- ocv_download(FILENAME "${NVIDIA_OPTICAL_FLOW_2_0_HEADERS_COMMIT}.zip"
|
||||
- HASH ${NVIDIA_OPTICAL_FLOW_2_0_HEADERS_MD5}
|
||||
- URL "https://github.com/NVIDIA/NVIDIAOpticalFlowSDK/archive/"
|
||||
- DESTINATION_DIR "${NVIDIA_OPTICAL_FLOW_2_0_HEADERS_PATH}"
|
||||
- STATUS NVIDIA_OPTICAL_FLOW_2_0_HEADERS_DOWNLOAD_SUCCESS
|
||||
- ID "NVIDIA_OPTICAL_FLOW"
|
||||
- UNPACK RELATIVE_URL)
|
||||
-
|
||||
- if(NOT NVIDIA_OPTICAL_FLOW_2_0_HEADERS_DOWNLOAD_SUCCESS)
|
||||
- message(STATUS "Failed to download NVIDIA_Optical_Flow_2_0 Headers")
|
||||
- else()
|
||||
- message(STATUS "Building with NVIDIA Optical Flow API 2.0")
|
||||
- add_definitions(-DHAVE_NVIDIA_OPTFLOW=2)
|
||||
- ocv_include_directories(SYSTEM "${NVIDIA_OPTICAL_FLOW_2_0_HEADERS_PATH}/NVIDIAOpticalFlowSDK-${NVIDIA_OPTICAL_FLOW_2_0_HEADERS_COMMIT}")
|
||||
- endif()
|
||||
-endif()
|
||||
\ No newline at end of file
|
||||
+add_definitions(-DHAVE_NVIDIA_OPTFLOW=1)
|
||||
+ocv_include_directories(SYSTEM "${NVIDIA_OPTICAL_FLOW_1_0_HEADERS_PATH}")
|
||||
+ add_definitions(-DHAVE_NVIDIA_OPTFLOW=2)
|
||||
+ ocv_include_directories(SYSTEM "${NVIDIA_OPTICAL_FLOW_2_0_HEADERS_PATH}")
|
||||
+endif()
|
||||
|
|
Loading…
Reference in a new issue