diff -urN OpenCV-2.3.1-orig/CMakeLists.txt OpenCV-2.3.1/CMakeLists.txt --- OpenCV-2.3.1-orig/CMakeLists.txt 2011-08-17 22:42:55.000000000 +0300 +++ OpenCV-2.3.1/CMakeLists.txt 2011-08-19 14:29:28.889802927 +0300 @@ -1539,7 +1539,7 @@ add_subdirectory(data) add_subdirectory(3rdparty) -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.3.1-orig/samples/CMakeLists.txt OpenCV-2.3.1/samples/CMakeLists.txt --- OpenCV-2.3.1-orig/samples/CMakeLists.txt 2011-08-02 15:48:16.000000000 +0300 +++ OpenCV-2.3.1/samples/CMakeLists.txt 2011-08-19 14:29:28.890802914 +0300 @@ -3,12 +3,19 @@ # # ---------------------------------------------------------------------------- +if(BUILD_EXAMPLES OR INSTALL_C_EXAMPLES) add_subdirectory(c) add_subdirectory(cpp) if(NOT ANDROID) add_subdirectory(gpu) endif() +endif() + +if(INSTALL_PYTHON_EXAMPLES AND BUILD_NEW_PYTHON_SUPPORT) +add_subdirectory(python) +add_subdirectory(python2) +endif() if(BUILD_ANDROID_EXAMPLES) add_subdirectory(android) diff -urN OpenCV-2.3.1-orig/samples/gpu/CMakeLists.txt OpenCV-2.3.1/samples/gpu/CMakeLists.txt --- OpenCV-2.3.1-orig/samples/gpu/CMakeLists.txt 2011-08-12 00:17:05.000000000 +0300 +++ OpenCV-2.3.1/samples/gpu/CMakeLists.txt 2011-08-19 14:39:59.379420799 +0300 @@ -71,7 +71,7 @@ if (NOT WIN32) file(GLOB install_list *.c *.cpp *.jpg *.png *.data makefile.* build_all.sh *.dsp *.cmd ) install(FILES ${install_list} - DESTINATION share/opencv/samples/${project} + DESTINATION share/opencv/samples/gpu PERMISSIONS OWNER_READ GROUP_READ WORLD_READ) endif () diff -urN OpenCV-2.3.1-orig/samples/python/CMakeLists.txt OpenCV-2.3.1/samples/python/CMakeLists.txt --- OpenCV-2.3.1-orig/samples/python/CMakeLists.txt 1970-01-01 02:00:00.000000000 +0200 +++ OpenCV-2.3.1/samples/python/CMakeLists.txt 2011-08-19 14:40:20.072343997 +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.3.1-orig/samples/python2/CMakeLists.txt OpenCV-2.3.1/samples/python2/CMakeLists.txt --- OpenCV-2.3.1-orig/samples/python2/CMakeLists.txt 1970-01-01 02:00:00.000000000 +0200 +++ OpenCV-2.3.1/samples/python2/CMakeLists.txt 2011-08-19 14:40:31.182302811 +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()