opencv-2.3.1a-convert_sets_to_options.patch

convert sets to options for opencv-2.3.1a - Andreas K. Huettel, 2011-11-13 03:28 pm

Download (9.6 kB)

 
OpenCV-2.3.1-2-options/CMakeLists.txt 2011-11-13 14:11:45.000000000 +0100
72 72
# Build static or dynamic libs?
73 73
# Default: dynamic libraries
74 74
# ----------------------------------------------------------------------------
75
set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)")
75
OPTION(BUILD_SHARED_LIBS "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)" ON)
76 76

  
77 77
# ----------------------------------------------------------------------------
78 78
# Include debug info into debug libs?
79 79
# Default: yes
80 80
# ----------------------------------------------------------------------------
81
set(BUILD_WITH_DEBUG_INFO ON CACHE BOOL "Include debug info into debug libs")
81
OPTION(BUILD_WITH_DEBUG_INFO "Include debug info into debug libs" ON)
82 82

  
83 83
# ----------------------------------------------------------------------------
84 84
#  Get actual OpenCV version number from sources
......
318 318

  
319 319
# Build/install (or not) some apps:
320 320
# ===================================================
321
set(BUILD_EXAMPLES OFF CACHE BOOL "Build all examples")
322
set(INSTALL_C_EXAMPLES OFF CACHE BOOL "Install C examples")
323
set(INSTALL_PYTHON_EXAMPLES OFF CACHE BOOL "Install Python examples")
321
option(BUILD_EXAMPLES "Build all examples" OFF)
322
option(INSTALL_C_EXAMPLES "Install C examples" OFF)
323
option(INSTALL_PYTHON_EXAMPLES "Install Python examples" OFF)
324 324
if(ANDROID)
325
    set(INSTALL_ANDROID_EXAMPLES OFF CACHE BOOL "Install Android examples")
325
    option(INSTALL_ANDROID_EXAMPLES "Install Android examples" OFF)
326 326
endif()
327 327

  
328 328
# Build tests:
329 329
# ===================================================
330
set(BUILD_TESTS ON CACHE BOOL "Build tests")
330
option(BUILD_TESTS "Build tests" ON)
331 331

  
332 332
# Build 3rdparty libraries under unix
333 333
# ===================================================
334 334
if(WIN32)
335
    set(OPENCV_BUILD_3RDPARTY_LIBS TRUE  CACHE BOOL "Build 3rd party libraries")
335
    option(OPENCV_BUILD_3RDPARTY_LIBS "Build 3rd party libraries" TRUE)
336 336
else()
337
    set(OPENCV_BUILD_3RDPARTY_LIBS FALSE CACHE BOOL "Build 3rd party libraries")
337
    option(OPENCV_BUILD_3RDPARTY_LIBS "Build 3rd party libraries" FALSE)
338 338
endif()
339 339

  
340 340
include(OpenCVPCHSupport.cmake REQUIRED)
......
344 344
endif()
345 345

  
346 346
if(PCHSupport_FOUND)
347
    SET(USE_PRECOMPILED_HEADERS ON CACHE BOOL "Use precompiled headers")
347
    option(USE_PRECOMPILED_HEADERS "Use precompiled headers" ON)
348 348
else()
349 349
    SET(USE_PRECOMPILED_HEADERS OFF CACHE BOOL "Use precompiled headers" FORCE)
350 350
endif()
......
356 356
endif()
357 357

  
358 358
if(CMAKE_COMPILER_IS_GNUCXX)
359
    set(ENABLE_PROFILING OFF CACHE BOOL "Enable profiling in the GCC compiler (Add flags: -g -pg)")
360
    set(USE_OMIT_FRAME_POINTER ON CACHE BOOL "Enable -fomit-frame-pointer for GCC")
359
    option(ENABLE_PROFILING "Enable profiling in the GCC compiler (Add flags: -g -pg)" OFF)
360
    option(USE_OMIT_FRAME_POINTER "Enable -fomit-frame-pointer for GCC" ON)
361 361

  
362 362
    if(${CMAKE_SYSTEM_PROCESSOR} MATCHES amd64.*|x86_64.*)
363 363
        set(X86_64 1)
......
376 376
        #ELSE()
377 377
        #    SET(_USE_FAST_MATH ON)
378 378
        #ENDIF()
379
        set(USE_FAST_MATH ${_USE_FAST_MATH} CACHE BOOL "Enable -ffast-math (not recommended for GCC 4.6.x)")
380
        set(ENABLE_SSE ON CACHE BOOL "Enable SSE instructions")
381
        set(ENABLE_SSE2 ON CACHE BOOL "Enable SSE2 instructions")
382
        set(ENABLE_SSE3 OFF CACHE BOOL "Enable SSE3 instructions")
383
        set(ENABLE_SSSE3 OFF CACHE BOOL "Enable SSSE3 instructions")
384
        set(ENABLE_SSE41 OFF CACHE BOOL "Enable SSE4.1 instructions")
385
        set(ENABLE_SSE42 OFF CACHE BOOL "Enable SSE4.2 instructions")
379
        option(USE_FAST_MATH "Enable -ffast-math for GCC" ON)
380
        option(ENABLE_SSE "Enable SSE instructions" ON)
381
        option(ENABLE_SSE2 "Enable SSE2 instructions" ON)
382
        option(ENABLE_SSE3 "Enable SSE3 instructions" OFF)
383
        option(ENABLE_SSSE3 "Enable SSSE3 instructions" OFF)
384
        option(ENABLE_SSE41 "Enable SSE4.1 instructions" OFF)
385
        option(ENABLE_SSE42 "Enable SSE4.2 instructions" OFF)
386 386
    endif()
387 387
endif()
388 388

  
389 389
if(MSVC)
390
    set(ENABLE_SSE ON CACHE BOOL "Enable SSE instructions for MSVC")
391
    set(ENABLE_SSE2 ON CACHE BOOL "Enable SSE2 instructions for MSVC")
390
    option(ENABLE_SSE "Enable SSE instructions for MSVC" ON)
391
    option(ENABLE_SSE2 "Enable SSE2 instructions for MSVC" ON)
392 392
    if(CMAKE_C_COMPILER MATCHES "icc")
393
        set(ENABLE_SSE3 OFF CACHE BOOL "Enable SSE3 instructions for ICC")
394
        set(ENABLE_SSE4_1 OFF CACHE BOOL "Enable SSE4.1 instructions for ICC")
393
        option(ENABLE_SSE3 "Enable SSE3 instructions for ICC" OFF)
394
        option(ENABLE_SSE4_1 "Enable SSE4.1 instructions for ICC" OFF)
395 395
    endif()
396 396
endif()
397 397

  
398 398
# allow fine grained control over which libraries not to link, even if
399 399
# they are available on the system
400 400
# ====================================================================
401
set(WITH_PNG ON CACHE BOOL "Include PNG support")
402
set(WITH_JPEG ON CACHE BOOL "Include JPEG support")
403
set(WITH_JASPER ON CACHE BOOL "Include JPEG2K support")
404
set(WITH_TIFF ON CACHE BOOL "Include TIFF support")
405
set(WITH_OPENEXR ON CACHE BOOL "Include ILM support via OpenEXR")
401
option(WITH_PNG "Include PNG support" ON)
402
option(WITH_JPEG "Include JPEG support" ON)
403
option(WITH_JASPER "Include JPEG2K support" ON)
404
option(WITH_TIFF "Include TIFF support" ON)
405
option(WITH_OPENEXR "Include ILM support via OpenEXR" ON)
406 406

  
407 407
if(UNIX)
408
    set(WITH_FFMPEG ON CACHE BOOL "Include FFMPEG support")
408
    option(WITH_FFMPEG "Include FFMPEG support" ON)
409 409
    if(NOT APPLE)
410
        set(WITH_UNICAP OFF CACHE BOOL "Include Unicap support (GPL)")
411
        set(WITH_GTK ON CACHE BOOL "Include GTK support")
412
        set(WITH_GSTREAMER ON CACHE BOOL "Include Gstreamer support")
413
        set(WITH_V4L ON CACHE BOOL "Include Video 4 Linux support")
414
        set(WITH_XINE OFF CACHE BOOL "Include Xine support (GPL)")
410
        option(WITH_UNICAP "Include Unicap support (GPL)" OFF)
411
        option(WITH_GTK "Include GTK support" ON)
412
        option(WITH_GSTREAMER "Include Gstreamer support" ON)
413
        option(WITH_V4L "Include Video 4 Linux support" ON)
414
        option(WITH_XINE "Include Xine support (GPL)" OFF)
415 415
    endif()
416
    set(WITH_PVAPI ON CACHE BOOL "Include Prosilica GigE support")
417
    set(WITH_1394 ON CACHE BOOL "Include IEEE1394 support")
416
    option(WITH_PVAPI "Include Prosilica GigE support" ON)
417
    option(WITH_1394 "Include IEEE1394 support" ON)
418 418
endif()
419 419

  
420 420
if(APPLE)
421
    set(WITH_CARBON OFF CACHE BOOL "Use Carbon for UI instead of Cocoa")
422
    set(WITH_QUICKTIME OFF CACHE BOOL "Use QuickTime for Video I/O insted of QTKit")
421
    option(WITH_CARBON "Use Carbon for UI instead of Cocoa" OFF)
422
    option(WITH_QUICKTIME "Use QuickTime for Video I/O insted of QTKit" OFF)
423 423
endif()
424 424

  
425
set(WITH_TBB OFF CACHE BOOL "Include Intel TBB support")
426
set(WITH_IPP OFF CACHE BOOL "Include Intel IPP support")
427
set(WITH_EIGEN ON CACHE BOOL "Include Eigen2/Eigen3 support")
428
set(WITH_CUDA ON CACHE BOOL "Include NVidia Cuda Runtime support")
429

  
430
set(WITH_OPENNI OFF CACHE BOOL "Include OpenNI support")
431
set(WITH_XIMEA OFF CACHE BOOL "Include XIMEA cameras support")
425
option(WITH_TBB "Include TBB support" OFF)
426
option(WITH_IPP "Include Intel IPP support" OFF)
427
option(WITH_EIGEN "Include Eigen2/Eigen3 support" ON)
428
option(WITH_CUDA "Include NVidia Cuda Runtime support" ON)
429
 
430
option(WITH_OPENNI "Include OpenNI support" OFF)
431
option(WITH_XIMEA "Include XIMEA cameras support" OFF)
432 432

  
433 433
# ===================================================
434 434
# Macros that checks if module have been installed.
......
626 626
    include(OpenCVFindOpenEXR.cmake)
627 627
endif()
628 628

  
629
set(BUILD_DOCS ON CACHE BOOL "Build OpenCV Documentation")
629
option(BUILD_DOCS "Build OpenCV Documentation" ON)
630 630

  
631 631
if(BUILD_DOCS)
632 632
  include(OpenCVFindLATEX.cmake REQUIRED)
633 633
endif()
634 634

  
635
set(BUILD_NEW_PYTHON_SUPPORT ON CACHE BOOL "Build with Python support")
635
option(BUILD_NEW_PYTHON_SUPPORT "Build with Python support" ON)
636 636

  
637 637
if (WIN32)
638 638
    if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
......
836 836
#YV
837 837
############################### QT ################################
838 838

  
839
set(WITH_QT OFF CACHE BOOL "Build with Qt Backend support")
840
set(WITH_QT_OPENGL OFF CACHE BOOL "Add OpenGL extension to Qt")
839
option(WITH_QT "Build with Qt Backend support" OFF)
840
option(WITH_QT_OPENGL "Add OpenGL extension to Qt" OFF)
841 841

  
842 842
set(HAVE_QT 0)
843 843
set(HAVE_QT_OPENGL 0)
......
1054 1054
################## Extra HighGUI libs on Windows ###################
1055 1055

  
1056 1056
if(WIN32)
1057
    set(WITH_VIDEOINPUT ON CACHE BOOL "Build HighGUI with DirectShow support")
1057
    option(WITH_VIDEOINPUT "Build HighGUI with DirectShow support" ON)
1058 1058
    set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} comctl32 gdi32 ole32)
1059 1059

  
1060 1060
    if(WITH_VIDEOINPUT)
......
1123 1123
#           Set the maximum level of warnings:
1124 1124
# ----------------------------------------------------------------------------
1125 1125
# Should be set to true for development
1126
set(OPENCV_WARNINGS_ARE_ERRORS OFF CACHE BOOL "Treat warnings as errors")
1126
option(OPENCV_WARNINGS_ARE_ERRORS "Treat warnings as errors" OFF)
1127 1127
if (WIN32 AND ${CMAKE_GENERATOR} MATCHES "(MinGW)|(MSYS)")
1128 1128
    set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG" CACHE STRING "")
1129 1129
endif()
......
1494 1494
#-----------------------------------
1495 1495
# Source package:
1496 1496
#-----------------------------------
1497
set(BUILD_PACKAGE ON CACHE BOOL "Enables 'make package_source' command")
1497
option(BUILD_PACKAGE "Build a installer with the SDK" ON)
1498 1498

  
1499 1499
if(BUILD_PACKAGE)
1500 1500
    set(TARBALL_NAME "${CMAKE_PROJECT_NAME}-${OPENCV_VERSION_MAJOR}.${OPENCV_VERSION_MINOR}.${OPENCV_VERSION_PATCH}")