From cde697dd147917a6125f40b5aceac801e84e941c Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Wed, 4 Mar 2015 13:38:46 +0300 Subject: [PATCH] introduce BUILD_TINY_GPU_MODULE CMake option it adds OPENCV_TINY_GPU_MODULE definition, that will allow to build tiny version of gpu module (with limited image format support) --- CMakeLists.txt | 2 ++ cmake/OpenCVCompilerOptions.cmake | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index cd2095d..71d714b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -194,6 +194,7 @@ OCV_OPTION(BUILD_WITH_STATIC_CRT "Enables use of staticaly linked CRT for sta OCV_OPTION(BUILD_FAT_JAVA_LIB "Create fat java wrapper containing the whole OpenCV library" ON IF NOT BUILD_SHARED_LIBS AND CMAKE_COMPILER_IS_GNUCXX ) OCV_OPTION(BUILD_ANDROID_SERVICE "Build OpenCV Manager for Google Play" OFF IF ANDROID AND ANDROID_SOURCE_TREE ) OCV_OPTION(BUILD_ANDROID_PACKAGE "Build platform-specific package for Google Play" OFF IF ANDROID ) +OCV_OPTION(BUILD_TINY_GPU_MODULE "Build tiny gpu module with limited image format support" OFF ) # 3rd party libs OCV_OPTION(BUILD_ZLIB "Build zlib from source" WIN32 OR APPLE ) @@ -996,6 +997,7 @@ if(HAVE_CUDA) status(" NVIDIA GPU arch:" ${OPENCV_CUDA_ARCH_BIN}) status(" NVIDIA PTX archs:" ${OPENCV_CUDA_ARCH_PTX}) status(" Use fast math:" CUDA_FAST_MATH THEN YES ELSE NO) + status(" Tiny gpu module:" BUILD_TINY_GPU_MODULE THEN YES ELSE NO) endif() if(HAVE_OPENCL) diff --git a/cmake/OpenCVCompilerOptions.cmake b/cmake/OpenCVCompilerOptions.cmake index 6a93d00..a69ac8c 100644 --- a/cmake/OpenCVCompilerOptions.cmake +++ b/cmake/OpenCVCompilerOptions.cmake @@ -63,6 +63,10 @@ if(OPENCV_CAN_BREAK_BINARY_COMPATIBILITY) add_definitions(-DOPENCV_CAN_BREAK_BINARY_COMPATIBILITY) endif() +if(BUILD_TINY_GPU_MODULE) + add_definitions(-DOPENCV_TINY_GPU_MODULE) +endif() + if(CMAKE_COMPILER_IS_GNUCXX) # High level of warnings. add_extra_compiler_option(-W) -- 2.7.4