opencv/opencv-samples.patch

69 lines
2.7 KiB
Diff

diff -urN opencv-2.4.9-orig/CMakeLists.txt opencv-2.4.9/CMakeLists.txt
--- opencv-2.4.9-orig/CMakeLists.txt 2014-04-11 13:15:26.000000000 +0300
+++ opencv-2.4.9/CMakeLists.txt 2014-05-13 14:42:25.709764721 +0300
@@ -556,7 +556,7 @@
endif()
# examples
-if(BUILD_EXAMPLES OR BUILD_ANDROID_EXAMPLES OR INSTALL_PYTHON_EXAMPLES)
+if(BUILD_EXAMPLES OR INSTALL_C_EXAMPLES OR BUILD_ANDROID_EXAMPLES OR INSTALL_PYTHON_EXAMPLES)
add_subdirectory(samples)
endif()
diff -urN opencv-2.4.9-orig/samples/CMakeLists.txt opencv-2.4.9/samples/CMakeLists.txt
--- opencv-2.4.9-orig/samples/CMakeLists.txt 2014-04-11 13:15:26.000000000 +0300
+++ opencv-2.4.9/samples/CMakeLists.txt 2014-05-13 14:42:25.710764736 +0300
@@ -10,6 +10,7 @@
#
# ----------------------------------------------------------------------------
+if(BUILD_EXAMPLES OR INSTALL_C_EXAMPLES)
add_subdirectory(c)
add_subdirectory(cpp)
add_subdirectory(gpu)
@@ -18,7 +19,12 @@
if(ANDROID AND BUILD_ANDROID_EXAMPLES)
add_subdirectory(android)
endif()
+endif()
+if(INSTALL_PYTHON_EXAMPLES)
+add_subdirectory(python)
+add_subdirectory(python2)
+endif()
#
# END OF BUILD CASE 1: Build samples with library sources
diff -urN opencv-2.4.9-orig/samples/python/CMakeLists.txt opencv-2.4.9/samples/python/CMakeLists.txt
--- opencv-2.4.9-orig/samples/python/CMakeLists.txt 1970-01-01 02:00:00.000000000 +0200
+++ opencv-2.4.9/samples/python/CMakeLists.txt 2014-05-13 14:42:25.710764736 +0300
@@ -0,0 +1,12 @@
+# -------------------------------------------------------------------------
+# CMake file for Python samples. See root CMakeLists.txt
+# -------------------------------------------------------------------------
+
+file(GLOB PYTHON_SAMPLES *.py)
+if(NOT WIN32)
+install(FILES ${PYTHON_SAMPLES}
+ DESTINATION share/OpenCV/samples/python
+ PERMISSIONS OWNER_READ OWNER_EXECUTE
+ GROUP_READ GROUP_EXECUTE
+ WORLD_READ WORLD_EXECUTE)
+endif()
diff -urN opencv-2.4.9-orig/samples/python2/CMakeLists.txt opencv-2.4.9/samples/python2/CMakeLists.txt
--- opencv-2.4.9-orig/samples/python2/CMakeLists.txt 1970-01-01 02:00:00.000000000 +0200
+++ opencv-2.4.9/samples/python2/CMakeLists.txt 2014-05-13 14:42:25.711764750 +0300
@@ -0,0 +1,12 @@
+# -------------------------------------------------------------------------
+# CMake file for Python samples. See root CMakeLists.txt
+# -------------------------------------------------------------------------
+
+file(GLOB PYTHON_SAMPLES *.py)
+if(NOT WIN32)
+install(FILES ${PYTHON_SAMPLES}
+ DESTINATION share/OpenCV/samples/python2
+ PERMISSIONS OWNER_READ OWNER_EXECUTE
+ GROUP_READ GROUP_EXECUTE
+ WORLD_READ WORLD_EXECUTE)
+endif()