diff --git a/opencv/CMakeLists.txt b/opencv/CMakeLists.txt index b82d6ab8..204b2d43 100644 --- a/opencv/CMakeLists.txt +++ b/opencv/CMakeLists.txt @@ -17,7 +17,7 @@ if (ENABLE_OPENCV) ExternalProject_Add(OPENCV_BLD URL "${CMAKE_CURRENT_SOURCE_DIR}/opencv" BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS} - PATCH_COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/opencv.patch + PATCH_COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/opencv_cmake.patch CMAKE_ARGS -DMIN_VER_CMAKE=3.19 -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON diff --git a/opencv/opencv.patch b/opencv/opencv.patch deleted file mode 100644 index bef4c0fa..00000000 --- a/opencv/opencv.patch +++ /dev/null @@ -1,379 +0,0 @@ -diff -Naur opencv/.cache/.gitignore OPENCV_BLD/.cache/.gitignore ---- opencv/.cache/.gitignore 1969-12-31 19:00:00.000000000 -0500 -+++ OPENCV_BLD/.cache/.gitignore 2024-03-06 11:14:00.970668988 -0500 -@@ -0,0 +1 @@ -+* -diff -Naur opencv/cmake/FindPNG.cmake OPENCV_BLD/cmake/FindPNG.cmake ---- opencv/cmake/FindPNG.cmake 1969-12-31 19:00:00.000000000 -0500 -+++ OPENCV_BLD/cmake/FindPNG.cmake 2024-03-06 11:14:00.642674496 -0500 -@@ -0,0 +1,190 @@ -+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -+# file Copyright.txt or https://cmake.org/licensing for details. -+ -+#[=======================================================================[.rst: -+FindPNG -+------- -+ -+Find libpng, the official reference library for the PNG image format. -+ -+Imported targets -+^^^^^^^^^^^^^^^^ -+ -+.. versionadded:: 3.5 -+ -+This module defines the following :prop_tgt:`IMPORTED` target: -+ -+``PNG::PNG`` -+The libpng library, if found. -+ -+Result variables -+^^^^^^^^^^^^^^^^ -+ -+This module will set the following variables in your project: -+ -+``PNG_INCLUDE_DIRS`` -+where to find png.h, etc. -+``PNG_LIBRARIES`` -+the libraries to link against to use PNG. -+``PNG_DEFINITIONS`` -+You should add_definitions(${PNG_DEFINITIONS}) before compiling code -+that includes png library files. -+``PNG_FOUND`` -+If false, do not try to use PNG. -+``PNG_VERSION_STRING`` -+the version of the PNG library found (since CMake 2.8.8) -+ -+Obsolete variables -+^^^^^^^^^^^^^^^^^^ -+ -+The following variables may also be set, for backwards compatibility: -+ -+``PNG_LIBRARY`` -+where to find the PNG library. -+``PNG_INCLUDE_DIR`` -+where to find the PNG headers (same as PNG_INCLUDE_DIRS) -+ -+Since PNG depends on the ZLib compression library, none of the above -+will be defined unless ZLib can be found. -+#]=======================================================================] -+ -+if(PNG_FIND_QUIETLY) -+ set(_FIND_ZLIB_ARG QUIET) -+endif() -+find_package(ZLIB ${_FIND_ZLIB_ARG}) -+ -+if(ZLIB_FOUND) -+ set(_PNG_SEARCHES) -+ -+ # Search PNG_ROOT first if it is set. -+ if(PNG_ROOT) -+ set(_PNG_SEARCH_ROOT PATHS ${PNG_ROOT} NO_DEFAULT_PATH) -+ list(APPEND _PNG_SEARCHES _PNG_SEARCH_ROOT) -+ endif() -+ -+ list(APPEND PNG_NAMES png_brl libpng_brl png libpng) -+ unset(PNG_NAMES_DEBUG) -+ set(_PNG_VERSION_SUFFIXES 17 16 15 14 12) -+ if (PNG_FIND_VERSION MATCHES "^([0-9]+)\\.([0-9]+)(\\..*)?$") -+ set(_PNG_VERSION_SUFFIX_MIN "${CMAKE_MATCH_1}${CMAKE_MATCH_2}") -+ if (PNG_FIND_VERSION_EXACT) -+ set(_PNG_VERSION_SUFFIXES ${_PNG_VERSION_SUFFIX_MIN}) -+ else () -+ string(REGEX REPLACE -+ "${_PNG_VERSION_SUFFIX_MIN}.*" "${_PNG_VERSION_SUFFIX_MIN}" -+ _PNG_VERSION_SUFFIXES "${_PNG_VERSION_SUFFIXES}") -+ endif () -+ unset(_PNG_VERSION_SUFFIX_MIN) -+ endif () -+ foreach(v IN LISTS _PNG_VERSION_SUFFIXES) -+ list(APPEND PNG_NAMES png_brl${v} libpng_brl${v} png${v} libpng${v} libpng${v}_static) -+ list(APPEND PNG_NAMES_DEBUG png_brl${v}d libpng_brl${v}d png${v}d libpng${v}d libpng${v}_staticd) -+ endforeach() -+ unset(_PNG_VERSION_SUFFIXES) -+ -+ # Try each search configuration. -+ # For compatibility with versions prior to this multi-config search, honor -+ # any PNG_LIBRARY that is already specified and skip the search. -+ if(NOT PNG_LIBRARY) -+ foreach(search ${_PNG_SEARCHES}) -+ find_path(PNG_PNG_INCLUDE_DIR png.h ${${search}} PATH_SUFFIXES include include/libpng) -+ find_library(PNG_LIBRARY_RELEASE ${${search}} NAMES ${PNG_NAMES} NAMES_PER_DIR PATH_SUFFIXES lib) -+ find_library(PNG_LIBRARY_DEBUG ${${search}} NAMES ${PNG_NAMES_DEBUG} NAMES_PER_DIR PATH_SUFFIXES lib) -+ include(SelectLibraryConfigurations) -+ select_library_configurations(PNG) -+ mark_as_advanced(PNG_LIBRARY_RELEASE PNG_LIBRARY_DEBUG) -+ endforeach() -+ endif() -+ -+ mark_as_advanced(PNG_LIBRARY) -+ mark_as_advanced(PNG_PNG_INCLUDE_DIR) -+ -+ # If we still don't have PNG_LIBRARY, try without specifying search paths -+ if(NOT PNG_LIBRARY) -+ find_library(PNG_LIBRARY_RELEASE NAMES ${PNG_NAMES} NAMES_PER_DIR PATH_SUFFIXES lib) -+ find_library(PNG_LIBRARY_DEBUG NAMES ${PNG_NAMES_DEBUG} NAMES_PER_DIR PATH_SUFFIXES lib) -+ include(SelectLibraryConfigurations) -+ select_library_configurations(PNG) -+ mark_as_advanced(PNG_LIBRARY_RELEASE PNG_LIBRARY_DEBUG) -+ endif() -+ unset(PNG_NAMES) -+ unset(PNG_NAMES_DEBUG) -+ -+ # Set by select_library_configurations(), but we want the one from -+ # find_package_handle_standard_args() below. -+ unset(PNG_FOUND) -+ -+ if (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR) -+ # png.h includes zlib.h. Sigh. -+ set(PNG_INCLUDE_DIRS ${PNG_PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ) -+ set(PNG_INCLUDE_DIR ${PNG_INCLUDE_DIRS} ) # for backward compatibility -+ set(PNG_LIBRARIES ${PNG_LIBRARY} ${ZLIB_LIBRARY}) -+ if((CMAKE_SYSTEM_NAME STREQUAL "Linux") AND -+ ("${PNG_LIBRARY}" MATCHES "\\${CMAKE_STATIC_LIBRARY_SUFFIX}$")) -+ list(APPEND PNG_LIBRARIES m) -+ endif() -+ -+ if (CYGWIN) -+ if(BUILD_SHARED_LIBS) -+ # No need to define PNG_USE_DLL here, because it's default for Cygwin. -+ else() -+ set (PNG_DEFINITIONS -DPNG_STATIC) -+ set(_PNG_COMPILE_DEFINITIONS PNG_STATIC) -+ endif() -+ endif () -+ -+ if(NOT TARGET PNG::PNG) -+ add_library(PNG::PNG UNKNOWN IMPORTED) -+ set_target_properties(PNG::PNG PROPERTIES -+ INTERFACE_COMPILE_DEFINITIONS "${_PNG_COMPILE_DEFINITIONS}" -+ INTERFACE_INCLUDE_DIRECTORIES "${PNG_INCLUDE_DIRS}" -+ INTERFACE_LINK_LIBRARIES ZLIB::ZLIB) -+ if((CMAKE_SYSTEM_NAME STREQUAL "Linux") AND -+ ("${PNG_LIBRARY}" MATCHES "\\${CMAKE_STATIC_LIBRARY_SUFFIX}$")) -+ set_property(TARGET PNG::PNG APPEND PROPERTY -+ INTERFACE_LINK_LIBRARIES m) -+ endif() -+ -+ if(EXISTS "${PNG_LIBRARY}") -+ set_target_properties(PNG::PNG PROPERTIES -+ IMPORTED_LINK_INTERFACE_LANGUAGES "C" -+ IMPORTED_LOCATION "${PNG_LIBRARY}") -+ endif() -+ if(EXISTS "${PNG_LIBRARY_RELEASE}") -+ set_property(TARGET PNG::PNG APPEND PROPERTY -+ IMPORTED_CONFIGURATIONS RELEASE) -+ set_target_properties(PNG::PNG PROPERTIES -+ IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C" -+ IMPORTED_LOCATION_RELEASE "${PNG_LIBRARY_RELEASE}") -+ endif() -+ if(EXISTS "${PNG_LIBRARY_DEBUG}") -+ set_property(TARGET PNG::PNG APPEND PROPERTY -+ IMPORTED_CONFIGURATIONS DEBUG) -+ set_target_properties(PNG::PNG PROPERTIES -+ IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C" -+ IMPORTED_LOCATION_DEBUG "${PNG_LIBRARY_DEBUG}") -+ endif() -+ endif() -+ -+ unset(_PNG_COMPILE_DEFINITIONS) -+ endif () -+ -+ if (PNG_PNG_INCLUDE_DIR AND EXISTS "${PNG_PNG_INCLUDE_DIR}/png.h") -+ file(STRINGS "${PNG_PNG_INCLUDE_DIR}/png.h" png_version_str REGEX "^#define[ \t]+PNG_LIBPNG_VER_STRING[ \t]+\".+\"") -+ -+ string(REGEX REPLACE "^#define[ \t]+PNG_LIBPNG_VER_STRING[ \t]+\"([^\"]+)\".*" "\\1" PNG_VERSION_STRING "${png_version_str}") -+ unset(png_version_str) -+ endif () -+endif() -+ -+include(FindPackageHandleStandardArgs) -+find_package_handle_standard_args(PNG -+ REQUIRED_VARS PNG_LIBRARY PNG_PNG_INCLUDE_DIR -+ VERSION_VAR PNG_VERSION_STRING) -+ -+# Local Variables: -+# tab-width: 8 -+# mode: cmake -+# indent-tabs-mode: t -+# End: -+# ex: shiftwidth=2 tabstop=8 -diff -Naur opencv/cmake/FindZLIB.cmake OPENCV_BLD/cmake/FindZLIB.cmake ---- opencv/cmake/FindZLIB.cmake 1969-12-31 19:00:00.000000000 -0500 -+++ OPENCV_BLD/cmake/FindZLIB.cmake 2024-03-06 11:14:00.642674496 -0500 -@@ -0,0 +1,123 @@ -+#.rst: -+# FindZLIB -+# -------- -+# -+# Find the native ZLIB includes and library. -+# -+# IMPORTED Targets -+# ^^^^^^^^^^^^^^^^ -+# -+# This module defines :prop_tgt:`IMPORTED` target ``ZLIB::ZLIB``, if -+# ZLIB has been found. -+# -+# Result Variables -+# ^^^^^^^^^^^^^^^^ -+# -+# This module defines the following variables: -+# -+# :: -+# -+# ZLIB_INCLUDE_DIRS - where to find zlib.h, etc. -+# ZLIB_LIBRARIES - List of libraries when using zlib. -+# ZLIB_FOUND - True if zlib found. -+# -+# :: -+# -+# ZLIB_VERSION_STRING - The version of zlib found (x.y.z) -+# ZLIB_VERSION_MAJOR - The major version of zlib -+# ZLIB_VERSION_MINOR - The minor version of zlib -+# ZLIB_VERSION_PATCH - The patch version of zlib -+# ZLIB_VERSION_TWEAK - The tweak version of zlib -+# -+# Backward Compatibility -+# ^^^^^^^^^^^^^^^^^^^^^^ -+# -+# The following variable are provided for backward compatibility -+# -+# :: -+# -+# ZLIB_MAJOR_VERSION - The major version of zlib -+# ZLIB_MINOR_VERSION - The minor version of zlib -+# ZLIB_PATCH_VERSION - The patch version of zlib -+# -+# Hints -+# ^^^^^ -+# -+# A user may set ``ZLIB_ROOT`` to a zlib installation root to tell this -+# module where to look. -+ -+#============================================================================= -+# Copyright 2001-2011 Kitware, Inc. -+# -+# Distributed under the OSI-approved BSD License (the "License"); -+# see accompanying file Copyright.txt for details. -+# -+# This software is distributed WITHOUT ANY WARRANTY; without even the -+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -+# See the License for more information. -+#============================================================================= -+# (To distribute this file outside of CMake, substitute the full -+# License text for the above reference.) -+ -+set(_ZLIB_SEARCHES) -+ -+# Search ZLIB_ROOT first if it is set. -+if(ZLIB_ROOT) -+ set(_ZLIB_SEARCH_ROOT PATHS ${ZLIB_ROOT} NO_DEFAULT_PATH) -+ list(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_ROOT) -+endif() -+ -+# Normal search. -+set(_ZLIB_SEARCH_NORMAL -+ PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]" -+ "$ENV{PROGRAMFILES}/zlib" -+ ) -+list(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_NORMAL) -+ -+set(ZLIB_NAMES z_brl z zlib zdll zlib1 zlibd zlibd1) -+ -+# Try each search configuration. -+foreach(search ${_ZLIB_SEARCHES}) -+ find_path(ZLIB_INCLUDE_DIR NAMES zlib.h ${${search}} PATH_SUFFIXES include) -+ find_library(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} ${${search}} PATH_SUFFIXES lib) -+endforeach() -+ -+mark_as_advanced(ZLIB_LIBRARY ZLIB_INCLUDE_DIR) -+ -+if(ZLIB_INCLUDE_DIR AND EXISTS "${ZLIB_INCLUDE_DIR}/zlib.h") -+ file(STRINGS "${ZLIB_INCLUDE_DIR}/zlib.h" ZLIB_H REGEX "^#define ZLIB_VERSION \"[^\"]*\"$") -+ -+ string(REGEX REPLACE "^.*ZLIB_VERSION \"([0-9]+).*$" "\\1" ZLIB_VERSION_MAJOR "${ZLIB_H}") -+ string(REGEX REPLACE "^.*ZLIB_VERSION \"[0-9]+\\.([0-9]+).*$" "\\1" ZLIB_VERSION_MINOR "${ZLIB_H}") -+ string(REGEX REPLACE "^.*ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" ZLIB_VERSION_PATCH "${ZLIB_H}") -+ set(ZLIB_VERSION_STRING "${ZLIB_VERSION_MAJOR}.${ZLIB_VERSION_MINOR}.${ZLIB_VERSION_PATCH}") -+ -+ # only append a TWEAK version if it exists: -+ set(ZLIB_VERSION_TWEAK "") -+ if( "${ZLIB_H}" MATCHES "ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+)") -+ set(ZLIB_VERSION_TWEAK "${CMAKE_MATCH_1}") -+ set(ZLIB_VERSION_STRING "${ZLIB_VERSION_STRING}.${ZLIB_VERSION_TWEAK}") -+ endif() -+ -+ set(ZLIB_MAJOR_VERSION "${ZLIB_VERSION_MAJOR}") -+ set(ZLIB_MINOR_VERSION "${ZLIB_VERSION_MINOR}") -+ set(ZLIB_PATCH_VERSION "${ZLIB_VERSION_PATCH}") -+endif() -+ -+# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if -+# all listed variables are TRUE -+include(FindPackageHandleStandardArgs) -+FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB REQUIRED_VARS ZLIB_LIBRARY ZLIB_INCLUDE_DIR -+ VERSION_VAR ZLIB_VERSION_STRING) -+ -+if(ZLIB_FOUND) -+ set(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR}) -+ set(ZLIB_LIBRARIES ${ZLIB_LIBRARY}) -+ -+ if(NOT TARGET ZLIB::ZLIB) -+ add_library(ZLIB::ZLIB UNKNOWN IMPORTED) -+ set_target_properties(ZLIB::ZLIB PROPERTIES -+ IMPORTED_LOCATION "${ZLIB_LIBRARY}" -+ INTERFACE_INCLUDE_DIRECTORIES "${ZLIB_INCLUDE_DIRS}") -+ endif() -+endif() -diff -Naur opencv/cmake/OpenCVInstallLayout.cmake OPENCV_BLD/cmake/OpenCVInstallLayout.cmake ---- opencv/cmake/OpenCVInstallLayout.cmake 2024-03-06 11:15:18.249391428 -0500 -+++ OPENCV_BLD/cmake/OpenCVInstallLayout.cmake 2024-03-06 11:14:00.642674496 -0500 -@@ -22,12 +22,12 @@ - - elseif(WIN32 AND CMAKE_HOST_SYSTEM_NAME MATCHES Windows) - -- if(DEFINED OpenCV_RUNTIME AND DEFINED OpenCV_ARCH) -- ocv_update(OPENCV_INSTALL_BINARIES_PREFIX "${OpenCV_ARCH}/${OpenCV_RUNTIME}/") -- else() -- message(STATUS "Can't detect runtime and/or arch") -+ #if(DEFINED OpenCV_RUNTIME AND DEFINED OpenCV_ARCH) -+ #ocv_update(OPENCV_INSTALL_BINARIES_PREFIX "${OpenCV_ARCH}/${OpenCV_RUNTIME}/") -+ #else() -+ #message(STATUS "Can't detect runtime and/or arch") - ocv_update(OPENCV_INSTALL_BINARIES_PREFIX "") -- endif() -+ #endif() - if(OpenCV_STATIC) - ocv_update(OPENCV_INSTALL_BINARIES_SUFFIX "staticlib") - else() -diff -Naur opencv/CMakeLists.txt OPENCV_BLD/CMakeLists.txt ---- opencv/CMakeLists.txt 2024-06-25 10:25:05.539691869 -0400 -+++ OPENCV_BLD/CMakeLists.txt 2024-06-25 10:28:39.828624534 -0400 -@@ -13,6 +13,8 @@ - ") - endif() - -+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") -+ - include(cmake/OpenCVMinDepVersions.cmake) - - if(CMAKE_SYSTEM_NAME MATCHES WindowsPhone OR CMAKE_SYSTEM_NAME MATCHES WindowsStore) -@@ -68,6 +70,10 @@ - cmake_policy(SET CMP0071 NEW) # CMake 3.10+: Let `AUTOMOC` and `AUTOUIC` process `GENERATED` files. - endif() - -+if (POLICY CMP0074) -+ cmake_policy(SET CMP0074 NEW) # CMake 3.12+: find_package() uses _ROOT variables. -+endif (POLICY CMP0074) -+ - if(POLICY CMP0075) - cmake_policy(SET CMP0075 NEW) # CMake 3.12+: Include file check macros honor `CMAKE_REQUIRED_LIBRARIES` - endif() -@@ -1154,7 +1160,7 @@ - if(ANDROID OR NOT UNIX) - install(FILES ${OPENCV_LICENSE_FILE} - PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ -- DESTINATION ./ COMPONENT libs) -+ DESTINATION doc/legal/other/opencv COMPONENT libs) - if(OPENCV_README_FILE) - install(FILES ${OPENCV_README_FILE} - PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ diff --git a/opencv/opencv_cmake.patch b/opencv/opencv_cmake.patch new file mode 100644 index 00000000..e480e567 --- /dev/null +++ b/opencv/opencv_cmake.patch @@ -0,0 +1,81 @@ +diff -Naur opencv/cmake/OpenCVInstallLayout.cmake OPENCV_BLD/cmake/OpenCVInstallLayout.cmake +--- opencv/cmake/OpenCVInstallLayout.cmake 2024-10-11 12:49:34.114560179 -0400 ++++ OPENCV_BLD/cmake/OpenCVInstallLayout.cmake 2024-10-11 12:47:31.106792946 -0400 +@@ -22,12 +22,12 @@ + + elseif(WIN32 AND CMAKE_HOST_SYSTEM_NAME MATCHES Windows) + +- if(DEFINED OpenCV_RUNTIME AND DEFINED OpenCV_ARCH) +- ocv_update(OPENCV_INSTALL_BINARIES_PREFIX "${OpenCV_ARCH}/${OpenCV_RUNTIME}/") +- else() +- message(STATUS "Can't detect runtime and/or arch") ++ #if(DEFINED OpenCV_RUNTIME AND DEFINED OpenCV_ARCH) ++ #ocv_update(OPENCV_INSTALL_BINARIES_PREFIX "${OpenCV_ARCH}/${OpenCV_RUNTIME}/") ++ #else() ++ #message(STATUS "Can't detect runtime and/or arch") + ocv_update(OPENCV_INSTALL_BINARIES_PREFIX "") +- endif() ++ #endif() + if(OpenCV_STATIC) + ocv_update(OPENCV_INSTALL_BINARIES_SUFFIX "staticlib") + else() +diff -Naur opencv/CMakeLists.txt OPENCV_BLD/CMakeLists.txt +--- opencv/CMakeLists.txt 2024-10-11 12:49:34.061561135 -0400 ++++ OPENCV_BLD/CMakeLists.txt 2024-10-11 12:50:02.916040772 -0400 +@@ -68,6 +68,10 @@ + cmake_policy(SET CMP0071 NEW) # CMake 3.10+: Let `AUTOMOC` and `AUTOUIC` process `GENERATED` files. + endif() + ++if (POLICY CMP0074) ++ cmake_policy(SET CMP0074 NEW) # CMake 3.12+: find_package() uses _ROOT variables. ++endif (POLICY CMP0074) ++ + if(POLICY CMP0075) + cmake_policy(SET CMP0075 NEW) # CMake 3.12+: Include file check macros honor `CMAKE_REQUIRED_LIBRARIES` + endif() +@@ -1154,7 +1158,7 @@ + if(ANDROID OR NOT UNIX) + install(FILES ${OPENCV_LICENSE_FILE} + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ +- DESTINATION ./ COMPONENT libs) ++ DESTINATION doc/legal/other/opencv COMPONENT libs) + if(OPENCV_README_FILE) + install(FILES ${OPENCV_README_FILE} + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ +diff -Naur opencv/modules/core/CMakeLists.txt OPENCV_BLD/modules/core/CMakeLists.txt +--- opencv/modules/core/CMakeLists.txt 2024-10-11 12:49:34.193558751 -0400 ++++ OPENCV_BLD/modules/core/CMakeLists.txt 2024-10-11 12:47:31.108792909 -0400 +@@ -95,7 +95,7 @@ + ocv_glob_module_sources(SOURCES "${OPENCV_MODULE_opencv_core_BINARY_DIR}/version_string.inc" + HEADERS ${core_parallel_hdrs} ${module_opencl_hdrs} ${lib_cuda_hdrs} ${lib_cuda_hdrs_detail}) + +-ocv_module_include_directories(${the_module} ${ZLIB_INCLUDE_DIRS} ${OPENCL_INCLUDE_DIRS}) ++ocv_module_include_directories(${the_module} ${OPENCL_INCLUDE_DIRS}) + if(ANDROID AND HAVE_CPUFEATURES) + ocv_append_source_file_compile_definitions(${CMAKE_CURRENT_SOURCE_DIR}/src/system.cpp "HAVE_CPUFEATURES=1") + ocv_module_include_directories(${CPUFEATURES_INCLUDE_DIRS}) +@@ -166,7 +166,7 @@ + ocv_create_module(${extra_libs}) + + ocv_target_link_libraries(${the_module} PRIVATE +- "${ZLIB_LIBRARIES}" "${OPENCL_LIBRARIES}" "${VA_LIBRARIES}" ++ ZLIB::ZLIB "${OPENCL_LIBRARIES}" "${VA_LIBRARIES}" + "${OPENGL_LIBRARIES}" + "${GLX_LIBRARIES}" + "${LAPACK_LIBRARIES}" "${CPUFEATURES_LIBRARIES}" "${HALIDE_LIBRARIES}" +diff -Naur opencv/modules/imgcodecs/CMakeLists.txt OPENCV_BLD/modules/imgcodecs/CMakeLists.txt +--- opencv/modules/imgcodecs/CMakeLists.txt 2024-10-11 12:49:34.252557687 -0400 ++++ OPENCV_BLD/modules/imgcodecs/CMakeLists.txt 2024-10-11 12:47:31.108792909 -0400 +@@ -38,7 +38,11 @@ + if(HAVE_PNG) + add_definitions(${PNG_DEFINITIONS}) + ocv_include_directories(${PNG_INCLUDE_DIR}) +- list(APPEND GRFMT_LIBS ${PNG_LIBRARIES}) ++ if(TARGET PNG::PNG) ++ list(APPEND GRFMT_LIBS PNG::PNG) ++ else(TARGET PNG::PNG) ++ list(APPEND GRFMT_LIBS ${PNG_LIBRARIES}) ++ endif(TARGET PNG::PNG) + endif() + + if(HAVE_GDCM)