Information about cmake and build platform is added to the status report

This commit is contained in:
Andrey Kamaev 2012-02-21 12:42:51 +00:00
parent 0630e7010e
commit a8f27e4a84
2 changed files with 91 additions and 69 deletions

View File

@ -661,20 +661,39 @@ include(cmake/OpenCVGenConfig.cmake REQUIRED)
# Summary:
# ----------------------------------------------------------------------------
status("")
status("General configuration for opencv ${OPENCV_VERSION} =====================================")
status("General configuration for OpenCV ${OPENCV_VERSION} =====================================")
#build platform
status("")
status(" Platform:")
status(" Host:" ${CMAKE_HOST_SYSTEM_NAME} ${CMAKE_HOST_SYSTEM_VERSION} ${CMAKE_HOST_SYSTEM_PROCESSOR})
status(" Target:" ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_VERSION} ${CMAKE_SYSTEM_PROCESSOR})
status(" CMake:" ${CMAKE_VERSION})
status(" CMake generator:" ${CMAKE_GENERATOR})
status(" CMake build tool:" ${CMAKE_BUILD_TOOL})
if(MSVC)
status(" MSVC:" ${MSVC_VERSION})
endif()
if(CMAKE_GENERATOR MATCHES Xcode)
status(" Xcode:" ${XCODE_VERSION})
endif()
# C/C++ options
status("")
status(" C++:")
status(" Built as dynamic libs?:" BUILD_SHARED_LIBS THEN YES ELSE NO)
status(" C++ Compiler:" CMAKE_COMPILER THEN "${CMAKE_COMPILER}" ELSE "${CMAKE_CXX_COMPILER}")
status(" C++ flags (Release):" ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE})
status(" C++ flags (Debug):" ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG})
if(WIN32)
status(" Linker flags (Release):" ${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE})
status(" Linker flags (Debug):" ${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_DEBUG})
status(" Linker flags (Release):" ${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE})
status(" Linker flags (Debug):" ${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_DEBUG})
else()
status(" Linker flags (Release):" ${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS_RELEASE})
status(" Linker flags (Debug):" ${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS_DEBUG})
status(" Linker flags (Release):" ${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS_RELEASE})
status(" Linker flags (Debug):" ${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS_DEBUG})
endif()
# OpenCV modules
status("")
status(" OpenCV modules:")
string(REPLACE "opencv_" "" OPENCV_MODULES_BUILD_ST "${OPENCV_MODULES_BUILD}")
@ -686,20 +705,20 @@ status(" Disabled by user:" OPENCV_MODULES_DISABLED_USER THEN ${OPENCV
status(" Disabled by dependency:" OPENCV_MODULES_DISABLED_AUTO THEN ${OPENCV_MODULES_DISABLED_AUTO_ST} ELSE "-")
status(" Unavailable:" OPENCV_MODULES_DISABLED_FORCE THEN ${OPENCV_MODULES_DISABLED_FORCE_ST} ELSE "-")
# Android extra
if(ANDROID)
status("")
status(" Android: ")
status(" Android ABI:" ${ANDROID_ABI})
status(" Native API level:" android-${ANDROID_NATIVE_API_LEVEL})
status(" SDK target:" "${ANDROID_SDK_TARGET}")
if(BUILD_WITH_ANDROID_NDK)
status(" Android NDK:" "${ANDROID_NDK} (toolchain: ${ANDROID_TOOLCHAIN_NAME})")
elseif(BUILD_WITH_STANDALONE_TOOLCHAIN)
status(" Android toolchain:" "${ANDROID_STANDALONE_TOOLCHAIN}")
endif()
status(" android tool:" ANDROID_EXECUTABLE THEN "${ANDROID_EXECUTABLE} (${ANDROID_TOOLS_Pkg_Desc})" ELSE NO)
status(" ant:" ANT_EXECUTABLE THEN "${ANT_EXECUTABLE} (ver ${ANT_VERSION})" ELSE NO)
status("")
status(" Android: ")
status(" Android ABI:" ${ANDROID_ABI})
status(" Native API level:" android-${ANDROID_NATIVE_API_LEVEL})
status(" SDK target:" "${ANDROID_SDK_TARGET}")
if(BUILD_WITH_ANDROID_NDK)
status(" Android NDK:" "${ANDROID_NDK} (toolchain: ${ANDROID_TOOLCHAIN_NAME})")
elseif(BUILD_WITH_STANDALONE_TOOLCHAIN)
status(" Android toolchain:" "${ANDROID_STANDALONE_TOOLCHAIN}")
endif()
status(" android tool:" ANDROID_EXECUTABLE THEN "${ANDROID_EXECUTABLE} (${ANDROID_TOOLS_Pkg_Desc})" ELSE NO)
status(" ant:" ANT_EXECUTABLE THEN "${ANT_EXECUTABLE} (ver ${ANT_VERSION})" ELSE NO)
endif()
#YV
@ -707,24 +726,24 @@ status("")
status(" GUI: ")
if (HAVE_QT)
status(" QT 4.x:" HAVE_QT THEN YES ELSE NO)
status(" QT OpenGL support:" HAVE_QT_OPENGL THEN YES ELSE NO)
status(" QT 4.x:" HAVE_QT THEN YES ELSE NO)
status(" QT OpenGL support:" HAVE_QT_OPENGL THEN YES ELSE NO)
else()
if(WIN32)
status(" Win32 UI:" YES)
if(WIN32)
status(" Win32 UI:" YES)
else()
if(APPLE)
if(WITH_CARBON)
status(" Carbon:" YES)
else()
status(" Cocoa:" YES)
endif()
else()
if(APPLE)
if(WITH_CARBON)
status(" Carbon:" YES)
else()
status(" Cocoa:" YES)
endif()
else()
status(" GTK+ 2.x:" HAVE_GTK THEN YES ELSE NO)
status(" GThread :" HAVE_GTHREAD THEN YES ELSE NO)
status(" GtkGlExt:" HAVE_GTKGLEXT THEN YES ELSE NO)
endif()
status(" GTK+ 2.x:" HAVE_GTK THEN YES ELSE NO)
status(" GThread :" HAVE_GTHREAD THEN YES ELSE NO)
status(" GtkGlExt:" HAVE_GTKGLEXT THEN YES ELSE NO)
endif()
endif()
endif()
status(" OpenGL support:" HAVE_OPENGL THEN YES ELSE NO)
@ -743,42 +762,42 @@ status(" OpenNI:" HAVE_OPENNI THEN YES
status(" OpenNI PrimeSensor Modules:"
HAVE_OPENNI_PRIME_SENSOR_MODULE THEN YES ELSE NO)
if(WIN32)
status(" XIMEA:" HAVE_XIMEA THEN YES ELSE NO)
status(" XIMEA:" HAVE_XIMEA THEN YES ELSE NO)
endif()
# video
status("")
if(UNIX AND NOT APPLE)
status(" Video I/O:")
status(" DC1394 1.x:" HAVE_DC1394 THEN YES ELSE NO)
status(" DC1394 2.x:" HAVE_DC1394_2 THEN YES ELSE NO)
status(" FFMPEG:" HAVE_FFMPEG THEN YES ELSE NO)
status(" codec:" HAVE_FFMPEG_CODEC THEN YES ELSE NO)
status(" format:" HAVE_FFMPEG_FORMAT THEN YES ELSE NO)
status(" util:" HAVE_FFMPEG_UTIL THEN YES ELSE NO)
status(" swscale:" HAVE_FFMPEG_SWSCALE THEN YES ELSE NO)
status(" gentoo-style:" HAVE_GENTOO_FFMPEG THEN YES ELSE NO)
status(" GStreamer:" HAVE_GSTREAMER THEN YES ELSE NO)
status(" UniCap:" HAVE_UNICAP THEN YES ELSE NO)
status(" PvAPI:" HAVE_PVAPI THEN YES ELSE NO)
status(" V4L/V4L2:" HAVE_LIBV4L THEN "Using libv4l" ELSE ${HAVE_CAMV4L}/${HAVE_CAMV4L2})
status(" Xine:" HAVE_XINE THEN YES ELSE NO)
status(" Video I/O:")
status(" DC1394 1.x:" HAVE_DC1394 THEN YES ELSE NO)
status(" DC1394 2.x:" HAVE_DC1394_2 THEN YES ELSE NO)
status(" FFMPEG:" HAVE_FFMPEG THEN YES ELSE NO)
status(" codec:" HAVE_FFMPEG_CODEC THEN YES ELSE NO)
status(" format:" HAVE_FFMPEG_FORMAT THEN YES ELSE NO)
status(" util:" HAVE_FFMPEG_UTIL THEN YES ELSE NO)
status(" swscale:" HAVE_FFMPEG_SWSCALE THEN YES ELSE NO)
status(" gentoo-style:" HAVE_GENTOO_FFMPEG THEN YES ELSE NO)
status(" GStreamer:" HAVE_GSTREAMER THEN YES ELSE NO)
status(" UniCap:" HAVE_UNICAP THEN YES ELSE NO)
status(" PvAPI:" HAVE_PVAPI THEN YES ELSE NO)
status(" V4L/V4L2:" HAVE_LIBV4L THEN "Using libv4l" ELSE ${HAVE_CAMV4L}/${HAVE_CAMV4L2})
status(" Xine:" HAVE_XINE THEN YES ELSE NO)
if(ANDROID)
if(HAVE_opencv_androidcamera)
status(" AndroidNativeCamera:" BUILD_ANDROID_CAMERA_WRAPPER THEN "YES, build for Android ${ANDROID_VERSION}" ELSE "YES, use prebuilt libraries")
else()
status(" AndroidNativeCamera:" "NO (native camera requires Android API level 8 or higher)")
endif()
endif()
elseif(APPLE)
if(NOT IOS)
status(" Video I/O:" WITH_QUICKTIME THEN QuickTime ELSE QTKit)
if(ANDROID)
if(HAVE_opencv_androidcamera)
status(" AndroidNativeCamera:" BUILD_ANDROID_CAMERA_WRAPPER THEN "YES, build for Android ${ANDROID_VERSION}" ELSE "YES, use prebuilt libraries")
else()
status(" Video I/O: AVFoundation")
status(" AndroidNativeCamera:" "NO (native camera requires Android API level 8 or higher)")
endif()
endif()
elseif(APPLE)
if(NOT IOS)
status(" Video I/O:" WITH_QUICKTIME THEN QuickTime ELSE QTKit)
else()
status(" Video I/O: AVFoundation")
endif()
elseif(WIN32)
status(" Video I/O:" HAVE_VIDEOINPUT THEN DirectShow ELSE NO)
status(" Video I/O:" HAVE_VIDEOINPUT THEN DirectShow ELSE NO)
endif()
# Other third-party libraries
@ -786,10 +805,10 @@ status("")
status(" Other third-party libraries:")
if(WITH_IPP AND IPP_FOUND)
status(" Use IPP:" "${IPP_LATEST_VERSION_STR} [${IPP_LATEST_VERSION_MAJOR}.${IPP_LATEST_VERSION_MINOR}.${IPP_LATEST_VERSION_BUILD}]")
status(" at:" "${IPP_ROOT_DIR}")
status(" Use IPP:" "${IPP_LATEST_VERSION_STR} [${IPP_LATEST_VERSION_MAJOR}.${IPP_LATEST_VERSION_MINOR}.${IPP_LATEST_VERSION_BUILD}]")
status(" at:" "${IPP_ROOT_DIR}")
else()
status(" Use IPP:" WITH_IPP AND NOT IPP_FOUND THEN "IPP not found" ELSE NO)
status(" Use IPP:" WITH_IPP AND NOT IPP_FOUND THEN "IPP not found" ELSE NO)
endif()
status(" Use TBB:" HAVE_TBB THEN YES ELSE NO)
@ -804,7 +823,7 @@ status(" Interfaces:")
status(" Python:" HAVE_opencv_python THEN YES ELSE NO)
status(" Python numpy:" PYTHON_USE_NUMPY THEN YES ELSE "NO (Python wrappers will not be generated)")
if(ANDROID)
status(" Java:" HAVE_opencv_java THEN YES ELSE NO)
status(" Java:" HAVE_opencv_java THEN YES ELSE NO)
endif()
# documentation
@ -813,9 +832,9 @@ status(" Documentation:")
status(" Sphinx:" HAVE_SPHINX THEN "${SPHINX_BUILD} (ver ${SPHINX_VERSION})" ELSE NO)
status(" PdfLaTeX compiler:" PDFLATEX_COMPILER THEN "${PDFLATEX_COMPILER}" ELSE NO)
if(BUILD_DOCS AND HAVE_SPHINX)
status(" Build Documentation:" PDFLATEX_COMPILER THEN YES ELSE "YES (only HTML without math expressions)")
status(" Build Documentation:" PDFLATEX_COMPILER THEN YES ELSE "YES (only HTML without math expressions)")
else()
status(" Build Documentation:" NO)
status(" Build Documentation:" NO)
endif()
# samples and tests
@ -826,8 +845,8 @@ status(" Performance tests:" BUILD_PERF_TESTS THEN YES ELSE NO)
status(" Examples:" BUILD_EXAMPLES THEN YES ELSE NO)
if(ANDROID)
status(" Android tests:" BUILD_TESTS AND CAN_BUILD_ANDROID_PROJECTS THEN YES ELSE NO)
status(" Android examples:" BUILD_ANDROID_EXAMPLES THEN YES ELSE NO)
status(" Android tests:" BUILD_TESTS AND CAN_BUILD_ANDROID_PROJECTS THEN YES ELSE NO)
status(" Android examples:" BUILD_ANDROID_EXAMPLES THEN YES ELSE NO)
endif()
#auxiliary
@ -842,6 +861,6 @@ status("")
# Warn in the case of in-source build
# ----------------------------------------------------------------------------
if("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
message(WARNING "The source directory is the same as binary directory. \"make clean\" may damage the source tree")
message(WARNING "The source directory is the same as binary directory. \"make clean\" may damage the source tree")
endif()

View File

@ -840,6 +840,9 @@ set( CMAKE_C_FLAGS "${ANDROID_CXX_FLAGS} ${CMAKE_C_FLAGS}" )
include( CMakeForceCompiler )
CMAKE_FORCE_C_COMPILER( "${CMAKE_C_COMPILER}" GNU )
CMAKE_FORCE_CXX_COMPILER( "${CMAKE_CXX_COMPILER}" GNU )
set( CMAKE_SIZEOF_VOID_P 4 )
set( CMAKE_C_SIZEOF_DATA_PTR 4 )
set( CMAKE_CXX_SIZEOF_DATA_PTR 4 )
#set these global flags for cmake client scripts to change behavior
set( ANDROID True )