-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
28d8a49
commit 9791355
Showing
3 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
recipes/opencv/4.x/patches/4.8.1-0003-openvino-cmake-fix.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- a/cmake/OpenCVUtils.cmake | ||
+++ b/cmake/OpenCVUtils.cmake | ||
@@ -1632,13 +1632,19 @@ function(ocv_add_external_target name inc link def) | ||
endif() | ||
endfunction() | ||
|
||
+set(__OPENCV_EXPORTED_EXTERNAL_TARGETS "" CACHE INTERNAL "") | ||
function(ocv_install_used_external_targets) | ||
if(NOT BUILD_SHARED_LIBS | ||
AND NOT (CMAKE_VERSION VERSION_LESS "3.13.0") # upgrade CMake: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/2152 | ||
) | ||
foreach(tgt in ${ARGN}) | ||
if(tgt MATCHES "^ocv\.3rdparty\.") | ||
- install(TARGETS ${tgt} EXPORT OpenCVModules) | ||
+ list(FIND __OPENCV_EXPORTED_EXTERNAL_TARGETS "${tgt}" _found) | ||
+ if(_found EQUAL -1) # don't export target twice | ||
+ install(TARGETS ${tgt} EXPORT OpenCVModules) | ||
+ list(APPEND __OPENCV_EXPORTED_EXTERNAL_TARGETS "${tgt}") | ||
+ set(__OPENCV_EXPORTED_EXTERNAL_TARGETS "${__OPENCV_EXPORTED_EXTERNAL_TARGETS}" CACHE INTERNAL "") | ||
+ endif() | ||
endif() | ||
endforeach() | ||
endif() |