Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui committed Dec 9, 2023
1 parent 7c5a509 commit 5d3d691
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 6 deletions.
30 changes: 27 additions & 3 deletions patches/opencv-3.4.20-minimal-install.patch
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ diff -Nuarp opencv-3.4.20.orig/cmake/OpenCVUtils.cmake opencv-3.4.20/cmake/OpenC

diff -Nuarp opencv-3.4.20.orig/CMakeLists.txt opencv-3.4.20/CMakeLists.txt
--- opencv-3.4.20.orig/CMakeLists.txt 2023-06-27 19:29:13.000000000 +0800
+++ opencv-3.4.20/CMakeLists.txt 2023-12-09 23:09:41.575017208 +0800
+++ opencv-3.4.20/CMakeLists.txt 2023-12-10 00:03:34.915870615 +0800
@@ -903,24 +903,13 @@ ocv_add_modules_compiler_options()
add_subdirectory(modules)

Expand All @@ -55,14 +55,38 @@ diff -Nuarp opencv-3.4.20.orig/CMakeLists.txt opencv-3.4.20/CMakeLists.txt
-if(BUILD_EXAMPLES OR BUILD_ANDROID_EXAMPLES OR INSTALL_PYTHON_EXAMPLES OR INSTALL_C_EXAMPLES)
- add_subdirectory(samples)
-endif()
-
-if(ANDROID)
- add_subdirectory(platforms/android/service)
-endif()
+

# ----------------------------------------------------------------------------
# Finalization: generate configuration-based files
@@ -973,12 +962,6 @@ if(INSTALL_TESTS AND OPENCV_TEST_DATA_PA
endif()
endif()

-if(NOT OPENCV_README_FILE)
- if(ANDROID)
- set(OPENCV_README_FILE ${CMAKE_CURRENT_SOURCE_DIR}/platforms/android/README.android)
- endif()
-endif()
-
if(NOT OPENCV_LICENSE_FILE)
set(OPENCV_LICENSE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE)
endif()
@@ -988,11 +971,6 @@ if(ANDROID OR NOT UNIX)
install(FILES ${OPENCV_LICENSE_FILE}
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
DESTINATION ./ COMPONENT libs)
- if(OPENCV_README_FILE)
- install(FILES ${OPENCV_README_FILE}
- PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
- DESTINATION ./ COMPONENT libs)
- endif()
endif()

if(COMMAND ocv_pylint_finalize)
diff -Nuarp opencv-3.4.20.orig/data/CMakeLists.txt opencv-3.4.20/data/CMakeLists.txt
--- opencv-3.4.20.orig/data/CMakeLists.txt 2023-06-27 19:29:13.000000000 +0800
+++ opencv-3.4.20/data/CMakeLists.txt 2023-12-09 21:23:02.838290043 +0800
Expand Down
30 changes: 27 additions & 3 deletions patches/opencv-4.8.1-minimal-install.patch
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ diff -Nuarp opencv-4.8.1.orig/cmake/OpenCVUtils.cmake opencv-4.8.1/cmake/OpenCVU

diff -Nuarp opencv-4.8.1.orig/CMakeLists.txt opencv-4.8.1/CMakeLists.txt
--- opencv-4.8.1.orig/CMakeLists.txt 2023-09-27 18:18:31.000000000 +0800
+++ opencv-4.8.1/CMakeLists.txt 2023-12-09 23:10:35.893746090 +0800
+++ opencv-4.8.1/CMakeLists.txt 2023-12-10 00:03:50.757791063 +0800
@@ -967,24 +967,13 @@ ocv_add_modules_compiler_options()
ocv_register_modules()

Expand All @@ -55,14 +55,38 @@ diff -Nuarp opencv-4.8.1.orig/CMakeLists.txt opencv-4.8.1/CMakeLists.txt
-if(BUILD_EXAMPLES OR BUILD_ANDROID_EXAMPLES OR INSTALL_ANDROID_EXAMPLES OR INSTALL_PYTHON_EXAMPLES OR INSTALL_C_EXAMPLES)
- add_subdirectory(samples)
-endif()
-
-if(ANDROID)
- add_subdirectory(platforms/android/service)
-endif()
+

# ----------------------------------------------------------------------------
# Finalization: generate configuration-based files
@@ -1035,12 +1024,6 @@ if(INSTALL_TESTS AND OPENCV_TEST_DATA_PA
endif()
endif()

-if(NOT OPENCV_README_FILE)
- if(ANDROID)
- set(OPENCV_README_FILE ${CMAKE_CURRENT_SOURCE_DIR}/platforms/android/README.android)
- endif()
-endif()
-
if(NOT OPENCV_LICENSE_FILE)
set(OPENCV_LICENSE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE)
endif()
@@ -1050,11 +1033,6 @@ if(ANDROID OR NOT UNIX)
install(FILES ${OPENCV_LICENSE_FILE}
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
DESTINATION ./ COMPONENT libs)
- if(OPENCV_README_FILE)
- install(FILES ${OPENCV_README_FILE}
- PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
- DESTINATION ./ COMPONENT libs)
- endif()
endif()

if(COMMAND ocv_pylint_finalize)
diff -Nuarp opencv-4.8.1.orig/data/CMakeLists.txt opencv-4.8.1/data/CMakeLists.txt
--- opencv-4.8.1.orig/data/CMakeLists.txt 2023-09-27 18:18:31.000000000 +0800
+++ opencv-4.8.1/data/CMakeLists.txt 2023-12-09 21:26:45.381067118 +0800
Expand Down

0 comments on commit 5d3d691

Please sign in to comment.