diff options
| author | Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> | 2020-10-30 13:47:56 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-30 13:47:56 -0700 |
| commit | 6d0587f30b9337da243d9450f9b307be6f3a0d43 (patch) | |
| tree | 74532d934afe105776506fe268c69cdcdc6430b8 | |
| parent | d89bfc3bb597b24f18d755fd0dd3f0675512b7f6 (diff) | |
| download | vcpkg-6d0587f30b9337da243d9450f9b307be6f3a0d43.tar.gz vcpkg-6d0587f30b9337da243d9450f9b307be6f3a0d43.zip | |
[opencv4] Fix INTERFACE_LINK_LIBRARIES error (#14177)
| -rw-r--r-- | ports/opencv4/0010-fix-interface_link_libraries.patch | 22 | ||||
| -rw-r--r-- | ports/opencv4/CONTROL | 2 | ||||
| -rw-r--r-- | ports/opencv4/portfile.cmake | 1 |
3 files changed, 24 insertions, 1 deletions
diff --git a/ports/opencv4/0010-fix-interface_link_libraries.patch b/ports/opencv4/0010-fix-interface_link_libraries.patch new file mode 100644 index 000000000..647518313 --- /dev/null +++ b/ports/opencv4/0010-fix-interface_link_libraries.patch @@ -0,0 +1,22 @@ +diff --git a/modules/videoio/cmake/init.cmake b/modules/videoio/cmake/init.cmake +index 1efef12..81d5d9f 100644 +--- a/modules/videoio/cmake/init.cmake ++++ b/modules/videoio/cmake/init.cmake +@@ -12,8 +12,16 @@ function(ocv_add_external_target name inc link def) + set_target_properties(ocv.3rdparty.${name} PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${inc}" + INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${inc}" +- INTERFACE_LINK_LIBRARIES "${link}" + INTERFACE_COMPILE_DEFINITIONS "${def}") ++ # When cmake version is greater than or equal to 3.11, INTERFACE_LINK_LIBRARIES no longer applies to interface library ++ # See https://github.com/opencv/opencv/pull/18658 ++ if (CMAKE_VERSION VERSION_LESS 3.11) ++ set_target_properties(ocv.3rdparty.${name} PROPERTIES ++ INTERFACE_LINK_LIBRARIES "${link}") ++ else() ++ target_link_libraries(ocv.3rdparty.${name} INTERFACE ${link}) ++ endif() ++ # + if(NOT BUILD_SHARED_LIBS) + install(TARGETS ocv.3rdparty.${name} EXPORT OpenCVModules) + endif() diff --git a/ports/opencv4/CONTROL b/ports/opencv4/CONTROL index c384e8725..0c928ab7b 100644 --- a/ports/opencv4/CONTROL +++ b/ports/opencv4/CONTROL @@ -1,6 +1,6 @@ Source: opencv4 Version: 4.3.0 -Port-Version: 3 +Port-Version: 4 Build-Depends: zlib Homepage: https://github.com/opencv/opencv Description: computer vision library diff --git a/ports/opencv4/portfile.cmake b/ports/opencv4/portfile.cmake index 7b0849851..4c7d900c6 100644 --- a/ports/opencv4/portfile.cmake +++ b/ports/opencv4/portfile.cmake @@ -21,6 +21,7 @@ vcpkg_from_github( 0004-fix-policy-CMP0057.patch 0006-jpeg2000_getref.patch 0009-fix-uwp.patch + 0010-fix-interface_link_libraries.patch # Remove this patch when the next update ) file(REMOVE "${SOURCE_PATH}/cmake/FindCUDNN.cmake") |
