diff -urN OpenCV-2.2.0.old/CMakeLists.txt OpenCV-2.2.0/CMakeLists.txt --- OpenCV-2.2.0.old/CMakeLists.txt 2010-12-05 04:35:23.000000000 +0100 +++ OpenCV-2.2.0/CMakeLists.txt 2011-04-29 23:48:20.000000000 +0200 @@ -193,6 +193,11 @@ # ---------------------------------------------------------------------------- # CHECK FOR SYSTEM LIBRARIES, OPTIONS, ETC.. # ---------------------------------------------------------------------------- +find_package(LAPACK REQUIRED) +find_package(BLAS REQUIRED) +find_package(ZLIB REQUIRED) +find_package(PkgConfig REQUIRED) +pkg_check_modules(FLANN REQUIRED flann) # Build/install (or not) some apps: # =================================================== diff -urN OpenCV-2.2.0.old/modules/core/CMakeLists.txt OpenCV-2.2.0/modules/core/CMakeLists.txt --- OpenCV-2.2.0.old/modules/core/CMakeLists.txt 2010-12-05 04:35:24.000000000 +0100 +++ OpenCV-2.2.0/modules/core/CMakeLists.txt 2011-04-30 10:56:32.000000000 +0200 @@ -1,3 +1,3 @@ -include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/include") -set(deps opencv_lapack zlib) +include_directories("${ZLIB_INCLUDE_DIRS}") +set(deps ${ZLIB_LIBRARIES} ${LAPACK_LIBRARIES}) define_opencv_module(core ${deps}) diff -urN OpenCV-2.2.0.old/modules/core/src/lapack.cpp OpenCV-2.2.0/modules/core/src/lapack.cpp --- OpenCV-2.2.0.old/modules/core/src/lapack.cpp 2010-12-05 04:35:24.000000000 +0100 +++ OpenCV-2.2.0/modules/core/src/lapack.cpp 2011-04-30 11:50:09.000000000 +0200 @@ -48,7 +48,7 @@ typedef __CLPK_integer integer; typedef __CLPK_real real; #else - #include "clapack.h" + #include #endif #undef abs diff -urN OpenCV-2.2.0.old/modules/haartraining/CMakeLists.txt OpenCV-2.2.0/modules/haartraining/CMakeLists.txt --- OpenCV-2.2.0.old/modules/haartraining/CMakeLists.txt 2010-12-05 04:35:24.000000000 +0100 +++ OpenCV-2.2.0/modules/haartraining/CMakeLists.txt 2011-04-29 23:48:41.000000000 +0200 @@ -18,7 +18,7 @@ link_directories(${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/bin ${CMAKE_CURRENT_BINARY_DIR}) endif() -set(haartraining_libs opencv_core opencv_imgproc opencv_highgui opencv_objdetect opencv_calib3d opencv_haartraining_engine) +set(haartraining_libs opencv_core opencv_imgproc opencv_highgui opencv_objdetect opencv_calib3d opencv_haartraining_engine ${BLAS_LIBRARIES} ${FLANN_LIBRARIES} ${LAPACK_LIBRARIES}) link_libraries(${haartraining_libs}) diff -urN OpenCV-2.2.0.old/modules/highgui/CMakeLists.txt OpenCV-2.2.0/modules/highgui/CMakeLists.txt --- OpenCV-2.2.0.old/modules/highgui/CMakeLists.txt 2010-12-05 04:35:24.000000000 +0100 +++ OpenCV-2.2.0/modules/highgui/CMakeLists.txt 2011-04-29 23:11:47.000000000 +0200 @@ -219,8 +219,8 @@ set(the_target "opencv_highgui") add_definitions(-DHIGHGUI_EXPORTS -DCVAPI_EXPORTS) - -include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include" +include_directories("${ZLIB_INCLUDE_DIRS}" + "${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_SOURCE_DIR}/../core/include" "${CMAKE_CURRENT_SOURCE_DIR}/../imgproc/include" "${CMAKE_CURRENT_SOURCE_DIR}/src" @@ -285,7 +285,7 @@ #target_link_libraries(${the_target} libtiff) endif() -target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} opencv_core opencv_imgproc zlib ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${TIFF_LIBRARIES} ${JASPER_LIBRARIES} ${HIGHGUI_LIBRARIES} ${OPENEXR_LIBRARIES}) +target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} opencv_core opencv_imgproc ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${TIFF_LIBRARIES} ${JASPER_LIBRARIES} ${HIGHGUI_LIBRARIES} ${OPENEXR_LIBRARIES}) if(APPLE) target_link_libraries(${the_target} "-lbz2 -framework Cocoa -framework QuartzCore") diff -urN OpenCV-2.2.0.old/modules/highgui/src/grfmt_png.cpp OpenCV-2.2.0/modules/highgui/src/grfmt_png.cpp --- OpenCV-2.2.0.old/modules/highgui/src/grfmt_png.cpp 2010-12-05 04:35:25.000000000 +0100 +++ OpenCV-2.2.0/modules/highgui/src/grfmt_png.cpp 2011-04-29 22:25:25.000000000 +0200 @@ -42,6 +42,7 @@ #include "precomp.hpp" +#include #ifdef HAVE_PNG /****************************************************************************************\ diff -urN OpenCV-2.2.0.old/OpenCVFindOpenEXR.cmake OpenCV-2.2.0/OpenCVFindOpenEXR.cmake --- OpenCV-2.2.0.old/OpenCVFindOpenEXR.cmake 2010-12-05 04:35:25.000000000 +0100 +++ OpenCV-2.2.0/OpenCVFindOpenEXR.cmake 2011-04-30 10:57:21.000000000 +0200 @@ -44,7 +44,7 @@ IF (OPENEXR_INCLUDE_PATH AND OPENEXR_IMATH_LIBRARY AND OPENEXR_ILMIMF_LIBRARY AND OPENEXR_IEX_LIBRARY AND OPENEXR_HALF_LIBRARY) SET(OPENEXR_FOUND TRUE) SET(OPENEXR_INCLUDE_PATHS ${OPENEXR_INCLUDE_PATH} CACHE STRING "The include paths needed to use OpenEXR") - SET(OPENEXR_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_ILMIMF_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} zlib CACHE STRING "The libraries needed to use OpenEXR") + SET(OPENEXR_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_ILMIMF_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} CACHE STRING "The libraries needed to use OpenEXR") ENDIF () IF(OPENEXR_FOUND)