diff -urN OpenCV-2.2.0.old/CMakeLists.txt OpenCV-2.2.0.new/CMakeLists.txt --- OpenCV-2.2.0.old/CMakeLists.txt 2010-12-05 04:35:23.000000000 +0100 +++ OpenCV-2.2.0.new/CMakeLists.txt 2011-04-30 11:57:37.000000000 +0200 @@ -13,7 +13,7 @@ # Add these standard paths to the search paths for FIND_LIBRARY # to find libraries from these locations first if(UNIX) - set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /lib /usr/lib) + set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /lib${LIB_SUFFIX} /usr/lib${LIB_SUFFIX}) endif() # it _must_ go before PROJECT(OpenCV) in order to work if (NOT CMAKE_INSTALL_PREFIX) @@ -94,7 +94,7 @@ # Build static or dynamic libs? # ---------------------------------------------------------------------------- # Default: dynamic libraries: -SET(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)") +OPTION(BUILD_SHARED_LIBS "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)" ON) IF(BUILD_SHARED_LIBS) SET(OPENCV_BUILD_SHARED_LIB 1) # For cvconfig.h, etc. ELSE(BUILD_SHARED_LIBS) @@ -196,13 +196,13 @@ # Build/install (or not) some apps: # =================================================== -set(BUILD_EXAMPLES OFF CACHE BOOL "Build all examples") -set(INSTALL_C_EXAMPLES OFF CACHE BOOL "Install C examples") -set(INSTALL_PYTHON_EXAMPLES OFF CACHE BOOL "Install Python examples") +option(BUILD_EXAMPLES "Build all examples" OFF) +option(INSTALL_C_EXAMPLES "Install C examples" OFF) +option(INSTALL_PYTHON_EXAMPLES "Install Python examples" OFF) # Build tests: # =================================================== -set(BUILD_TESTS ON CACHE BOOL "Build tests") +option(BUILD_TESTS "Build tests" ON) # Build 3rdparty libraries under unix # =================================================== @@ -229,12 +229,12 @@ #set(ENABLE_OPENMP ${DEFAULT_ENABLE_OPENMP} CACHE BOOL "") if(CMAKE_COMPILER_IS_GNUCXX) - set(ENABLE_PROFILING OFF CACHE BOOL "Enable profiling in the GCC compiler (Add flags: -g -pg)") - set(USE_OMIT_FRAME_POINTER ON CACHE BOOL "Enable -fomit-frame-pointer for GCC") + option(ENABLE_PROFILING "Enable profiling in the GCC compiler (Add flags: -g -pg)" OFF) + option(USE_OMIT_FRAME_POINTER "Enable -fomit-frame-pointer for GCC" ON) if(${CMAKE_SYSTEM_PROCESSOR} MATCHES arm*) # We can use only -O2 because the -O3 causes gcc crash - set(USE_O2 ON CACHE BOOL "Enable -O2 for GCC") - set(USE_FAST_MATH ON CACHE BOOL "Enable -ffast-math for GCC") + option(USE_O2 "Enable -O2 for GCC" ON) + option(USE_FAST_MATH "Enable -ffast-math for GCC" ON) endif() if(${CMAKE_SYSTEM_PROCESSOR} MATCHES amd64*) @@ -255,56 +255,56 @@ endif() if(${CMAKE_SYSTEM_PROCESSOR} MATCHES powerpc*) - set(USE_O3 ON CACHE BOOL "Enable -O3 for GCC") - set(ENABLE_POWERPC ON CACHE BOOL "Enable PowerPC for GCC") + option(USE_O3 "Enable -O3 for GCC" ON) + option(ENABLE_POWERPC "Enable PowerPC for GCC" ON) endif () if(X86 OR X86_64) # enable everything, since the available set of instructions is checked at runtime - set(USE_O3 ON CACHE BOOL "Enable -O3") - set(USE_FAST_MATH ON CACHE BOOL "Enable -ffast-math") - set(ENABLE_SSE ON CACHE BOOL "Enable SSE instructions") - set(ENABLE_SSE2 ON CACHE BOOL "Enable SSE2 instructions") - set(ENABLE_SSE3 OFF CACHE BOOL "Enable SSE3 instructions") - set(ENABLE_SSSE3 OFF CACHE BOOL "Enable SSSE3 instructions") - set(ENABLE_SSE41 OFF CACHE BOOL "Enable SSE4.1 instructions") - set(ENABLE_SSE42 OFF CACHE BOOL "Enable SSE4.2 instructions") + set(USE_O3 "Enable -O3" ON) + set(USE_FAST_MATH "Enable -ffast-math" ON) + option(ENABLE_SSE "Enable SSE instructions" ON) + option(ENABLE_SSE2 "Enable SSE2 instructions" ON) + option(ENABLE_SSE3 "Enable SSE3 instructions" OFF) + option(ENABLE_SSSE3 "Enable SSSE3 instructions" OFF) + option(ENABLE_SSE41 "Enable SSE4.1 instructions" OFF) + option(ENABLE_SSE42 "Enable SSE4.2 instructions" OFF) endif() endif() # allow fine grained control over which libraries not to link, even if # they are available on the system # ==================================================================== -set(WITH_PNG ON CACHE BOOL "Include PNG support") -set(WITH_JPEG ON CACHE BOOL "Include JPEG support") -set(WITH_JASPER ON CACHE BOOL "Include JPEG2K support") -set(WITH_TIFF ON CACHE BOOL "Include TIFF support") -set(WITH_OPENEXR ON CACHE BOOL "Include ILM support via OpenEXR") +option(WITH_PNG "Include PNG support" ON) +option(WITH_JPEG "Include JPEG support" ON) +option(WITH_JASPER "Include JPEG2K support" ON) +option(WITH_TIFF "Include TIFF support" ON) +option(WITH_OPENEXR "Include ILM support via OpenEXR" ON) if(UNIX) - set(WITH_FFMPEG ON CACHE BOOL "Include FFMPEG support") + option(WITH_FFMPEG "Include FFMPEG support" ON) if(NOT APPLE) - set(WITH_UNICAP OFF CACHE BOOL "Include Unicap support (GPL)") - set(WITH_GTK ON CACHE BOOL "Include GTK support") - set(WITH_GSTREAMER ON CACHE BOOL "Include Gstreamer support") - set(WITH_V4L ON CACHE BOOL "Include Video 4 Linux support") - set(WITH_XINE OFF CACHE BOOL "Include Xine support (GPL)") + option(WITH_UNICAP "Include Unicap support (GPL)" OFF) + option(WITH_GTK "Include GTK support" ON) + option(WITH_GSTREAMER "Include Gstreamer support" ON) + option(WITH_V4L "Include Video 4 Linux support" ON) + option(WITH_XINE "Include Xine support (GPL)" OFF) endif() - set(WITH_PVAPI ON CACHE BOOL "Include Prosilica GigE support") - set(WITH_1394 ON CACHE BOOL "Include IEEE1394 support") + option(WITH_PVAPI "Include Prosilica GigE support" ON) + option(WITH_1394 "Include IEEE1394 support" ON) endif() if(APPLE) - set(WITH_CARBON OFF CACHE BOOL "Use Carbon for UI instead of Cocoa") - set(WITH_QUICKTIME OFF CACHE BOOL "Use QuickTime for Video I/O insted of QTKit") + option(WITH_CARBON "Use Carbon for UI instead of Cocoa" OFF) + option(WITH_QUICKTIME "Use QuickTime for Video I/O insted of QTKit" OFF) endif() -set(WITH_TBB OFF CACHE BOOL "Include TBB support") -set(WITH_EIGEN2 ON CACHE BOOL "Include Eigen2/Eigen3 support") -set(WITH_CUDA OFF CACHE BOOL "Include NVidia Cuda Runtime support") +option(WITH_TBB "Include TBB support" OFF) +option(WITH_EIGEN2 "Include Eigen2/Eigen3 support" ON) +option(WITH_CUDA "Include NVidia Cuda Runtime support" OFF) if(WIN32) - set(WITH_VIDEOINPUT ON CACHE BOOL "Enable VideoInput support") + option(WITH_VIDEOINPUT "Enable VideoInput support" ON) endif() # =================================================== @@ -496,7 +496,7 @@ include(OpenCVFindOpenEXR.cmake) endif() -set(BUILD_NEW_PYTHON_SUPPORT ON CACHE BOOL "Build with Python support") +option(BUILD_NEW_PYTHON_SUPPORT "Build with Python support" ON) if(BUILD_NEW_PYTHON_SUPPORT) find_package(PythonInterp) @@ -513,8 +513,8 @@ string(REGEX MATCH "[0-9].[0-9]" PYTHON_VERSION_MAJOR_MINOR "${PYTHON_VERSION_FULL}") if(UNIX) - set(PYTHON_PLUGIN_INSTALL_PATH lib/python${PYTHON_VERSION_MAJOR_MINOR}/site-packages/opencv) - set(PYTHON_PACKAGES_PATH lib/python${PYTHON_VERSION_MAJOR_MINOR}/site-packages) + set(PYTHON_PLUGIN_INSTALL_PATH lib${LIB_SUFFIX}/python${PYTHON_VERSION_MAJOR_MINOR}/site-packages/opencv) + set(PYTHON_PACKAGES_PATH lib${LIB_SUFFIX}/python${PYTHON_VERSION_MAJOR_MINOR}/site-packages) endif() if(WIN32) get_filename_component(PYTHON_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${PYTHON_VERSION_MAJOR_MINOR}\\InstallPath]" ABSOLUTE CACHE) @@ -543,8 +543,8 @@ #YV ############################### QT ################################ -set(WITH_QT OFF CACHE BOOL "Build with Qt Backend support") -set(WITH_QT_OPENGL OFF CACHE BOOL "Add OpenGL extension to Qt") +option(WITH_QT "Build with Qt Backend support" OFF) +option(WITH_QT_OPENGL "Add OpenGL extension to Qt" OFF) set(HAVE_QT 0) set(HAVE_QT_OPENGL 0) @@ -823,15 +823,12 @@ ################## LATEX ################## -set(BUILD_LATEX_DOCS OFF CACHE BOOL "Build LaTeX OpenCV Documentation") +option(BUILD_LATEX_DOCS "Build LaTeX OpenCV Documentation" OFF) ################### DOXYGEN ############### find_package(Doxygen) - -if(DOXYGEN_FOUND) - set(BUILD_DOXYGEN_DOCS ON CACHE BOOL "Generate HTML docs using Doxygen") -endif() +option(BUILD_DOXYGEN_DOCS "Generate HTML docs using Doxygen" ON) # ---------------------------------------------------------------------------- # UPDATE CONFIG FILES & SCRIPTS: @@ -863,7 +860,7 @@ # Set the maximum level of warnings: # ---------------------------------------------------------------------------- # Should be set to true for development -set(OPENCV_WARNINGS_ARE_ERRORS OFF CACHE BOOL "Treat warnings as errors") +option(OPENCV_WARNINGS_ARE_ERRORS "Treat warnings as errors" OFF) set(EXTRA_C_FLAGS "") set(EXTRA_C_FLAGS_RELEASE "") @@ -1070,9 +1067,9 @@ set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin CACHE PATH "Output directory for applications" ) if(WIN32) -set(OPENCV_DOC_INSTALL_PATH doc) +set(OPENCV_DOC_INSTALL_PATH doc CACHE PATH "Directory for documentation to install (without prefix)") else() -set(OPENCV_DOC_INSTALL_PATH share/opencv/doc) +set(OPENCV_DOC_INSTALL_PATH share/doc/opencv-${OPENCV_VERSION}/ CACHE PATH "Directory for documentation to install (without prefix)") endif() # -------------------------------------------------------------------------------------------- @@ -1106,7 +1103,7 @@ set(CMAKE_INCLUDE_DIRS_CONFIGCMAKE "${CMAKE_INSTALL_PREFIX}/include/opencv" "${CMAKE_INSTALL_PREFIX}/include") set(CMAKE_BASE_INCLUDE_DIRS_CONFIGCMAKE "\"\"") -set(CMAKE_LIB_DIRS_CONFIGCMAKE "${CMAKE_INSTALL_PREFIX}/lib") +set(CMAKE_LIB_DIRS_CONFIGCMAKE "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}") exec_program(mkdir ARGS "-p \"${CMAKE_BINARY_DIR}/unix-install/\"" OUTPUT_VARIABLE RET_VAL) configure_file("${CMAKE_CURRENT_SOURCE_DIR}/OpenCVConfig.cmake.in" "${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig.cmake" IMMEDIATE @ONLY) @@ -1164,14 +1161,14 @@ # ------------------------------------------------------------------------------------------- set(prefix ${CMAKE_INSTALL_PREFIX}) set(exec_prefix "\${prefix}") -set(libdir "\${exec_prefix}/lib") +set(libdir "\${exec_prefix}/lib${LIB_SUFFIX}") set(includedir "\${prefix}/include") set(VERSION ${OPENCV_VERSION}) configure_file("${CMAKE_CURRENT_SOURCE_DIR}/opencv.pc.cmake.in" "${CMAKE_BINARY_DIR}/unix-install/opencv.pc" @ONLY IMMEDIATE) if(UNIX) - install(FILES ${CMAKE_BINARY_DIR}/unix-install/opencv.pc DESTINATION lib/pkgconfig) + install(FILES ${CMAKE_BINARY_DIR}/unix-install/opencv.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig) endif() @@ -1191,7 +1188,7 @@ # CPack target # ---------------------------------------------------------------------------- -set(BUILD_PACKAGE OFF CACHE BOOL "Build a installer with the SDK") +option(BUILD_PACKAGE "Build a installer with the SDK" OFF) if(BUILD_PACKAGE) diff -urN OpenCV-2.2.0.old/modules/ffmpeg/CMakeLists.txt OpenCV-2.2.0.new/modules/ffmpeg/CMakeLists.txt --- OpenCV-2.2.0.old/modules/ffmpeg/CMakeLists.txt 2010-12-05 04:35:24.000000000 +0100 +++ OpenCV-2.2.0.new/modules/ffmpeg/CMakeLists.txt 2011-04-30 10:51:26.000000000 +0200 @@ -43,12 +43,12 @@ VERSION ${OPENCV_VERSION} OUTPUT_NAME "${the_target}${OPENCV_DLLVERSION}" DEFINE_SYMBOL "CVAPI_EXPORTS" - ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/" + ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}/" RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/" ) install(TARGETS ${the_target} RUNTIME DESTINATION bin COMPONENT main - ARCHIVE DESTINATION lib COMPONENT main - LIBRARY DESTINATION lib COMPONENT main + ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT main + LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT main ) diff -urN OpenCV-2.2.0.old/modules/gpu/CMakeLists.txt OpenCV-2.2.0.new/modules/gpu/CMakeLists.txt --- OpenCV-2.2.0.old/modules/gpu/CMakeLists.txt 2010-12-05 04:35:24.000000000 +0100 +++ OpenCV-2.2.0.new/modules/gpu/CMakeLists.txt 2011-04-30 10:51:08.000000000 +0200 @@ -96,9 +96,9 @@ # Additional target properties set_target_properties(${the_target} PROPERTIES DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}" - ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/" + ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}/" RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/" - INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib" + INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" ) # Add the required libraries for linking: @@ -124,8 +124,8 @@ install(TARGETS ${the_target} RUNTIME DESTINATION bin COMPONENT main - LIBRARY DESTINATION lib COMPONENT main - ARCHIVE DESTINATION lib COMPONENT main) + LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT main + ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT main) install(FILES ${lib_hdrs} DESTINATION include/opencv2/${name} diff -urN OpenCV-2.2.0.old/modules/highgui/CMakeLists.txt OpenCV-2.2.0.new/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.new/modules/highgui/CMakeLists.txt 2011-04-30 10:53:11.000000000 +0200 @@ -250,9 +250,9 @@ # Additional target properties set_target_properties(${the_target} PROPERTIES DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}" - ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/" + ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}/" RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/" - INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib" + INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" LINK_INTERFACE_LIBRARIES "" ) @@ -302,8 +302,8 @@ install(TARGETS ${the_target} RUNTIME DESTINATION bin COMPONENT main - LIBRARY DESTINATION lib COMPONENT main - ARCHIVE DESTINATION lib COMPONENT main) + LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT main + ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT main) install(FILES ${highgui_ext_hdrs} DESTINATION include/opencv2/highgui diff -urN OpenCV-2.2.0.old/OpenCVModule.cmake OpenCV-2.2.0.new/OpenCVModule.cmake --- OpenCV-2.2.0.old/OpenCVModule.cmake 2010-12-05 04:35:25.000000000 +0100 +++ OpenCV-2.2.0.new/OpenCVModule.cmake 2011-04-30 10:53:45.000000000 +0200 @@ -51,9 +51,9 @@ # Additional target properties set_target_properties(${the_target} PROPERTIES DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}" - ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/" + ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}/" RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/" - INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib" + INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" ) # Add the required libraries for linking: @@ -75,8 +75,8 @@ install(TARGETS ${the_target} RUNTIME DESTINATION bin COMPONENT main - LIBRARY DESTINATION lib COMPONENT main - ARCHIVE DESTINATION lib COMPONENT main) + LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT main + ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT main) install(FILES ${lib_hdrs} DESTINATION include/opencv2/${name} diff -urN OpenCV-2.2.0.old/tests/cxts/CMakeLists.txt OpenCV-2.2.0.new/tests/cxts/CMakeLists.txt --- OpenCV-2.2.0.old/tests/cxts/CMakeLists.txt 2010-12-05 04:35:25.000000000 +0100 +++ OpenCV-2.2.0.new/tests/cxts/CMakeLists.txt 2011-04-30 10:54:15.000000000 +0200 @@ -51,7 +51,7 @@ # Additional target properties set_target_properties(${the_target} PROPERTIES DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}" - ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/" + ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}/" RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/" DEFINE_SYMBOL "CVAPI_EXPORTS" ) @@ -64,6 +64,6 @@ if(WIN32) install(TARGETS ${the_target} RUNTIME DESTINATION bin COMPONENT main - LIBRARY DESTINATION lib COMPONENT main - ARCHIVE DESTINATION lib COMPONENT main) + LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT main + ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT main) endif()