1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Merge pull request #8044 from alalek:opencv_world_with_contrib

This commit is contained in:
Alexander Alekhin
2017-01-25 12:54:15 +00:00
15 changed files with 79 additions and 83 deletions
+18 -8
View File
@@ -2,16 +2,26 @@
# CMake file for python support
# ----------------------------------------------------------------------------
if((WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Debug")
OR BUILD_opencv_world
)
ocv_module_disable(python2)
ocv_module_disable(python3)
if(ANDROID OR APPLE_FRAMEWORK OR WINRT)
set(__disable_python2 ON)
set(__disable_python3 ON)
elseif(BUILD_opencv_world OR (WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Debug"))
if(NOT DEFINED BUILD_opencv_python2)
set(__disable_python2 ON)
endif()
if(NOT DEFINED BUILD_opencv_python3)
set(__disable_python3 ON)
endif()
endif()
if(ANDROID OR APPLE_FRAMEWORK OR WINRT)
ocv_module_disable(python2)
ocv_module_disable(python3)
if(__disable_python2)
ocv_module_disable_(python2)
endif()
if(__disable_python3)
ocv_module_disable_(python3)
endif()
if(__disable_python2 AND __disable_python3)
return()
endif()
add_subdirectory(python2)
-45
View File
@@ -1,45 +0,0 @@
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
#include "precomp.hpp"
/* End of file. */
+1 -1
View File
@@ -5,7 +5,7 @@ if(HAVE_CUDA)
endif()
set(STITCHING_CONTRIB_DEPS "opencv_xfeatures2d")
if(BUILD_SHARED_LIBS AND BUILD_opencv_world)
if(BUILD_SHARED_LIBS AND BUILD_opencv_world AND OPENCV_WORLD_EXCLUDE_EXTRA_MODULES)
set(STITCHING_CONTRIB_DEPS "")
endif()
ocv_define_module(stitching opencv_imgproc opencv_features2d opencv_calib3d opencv_objdetect
+1 -1
View File
@@ -193,7 +193,7 @@ class CMakeCache:
self.tests_dir = os.path.normpath(path)
def read(self, path, fname):
rx = re.compile(r'^opencv_(\w+)_SOURCE_DIR:STATIC=(.*)$')
rx = re.compile(r'^OPENCV_MODULE_opencv_(\w+)_LOCATION:INTERNAL=(.*)$')
module_paths = {} # name -> path
with open(fname, "rt") as cachefile:
for l in cachefile.readlines():
+5 -3
View File
@@ -2,12 +2,14 @@ if(NOT WITH_VTK OR NOT DEFINED HAVE_VTK OR NOT HAVE_VTK)
ocv_module_disable(viz)
endif()
include(${VTK_USE_FILE})
set(the_description "Viz")
ocv_define_module(viz opencv_core ${VTK_LIBRARIES} WRAP python)
ocv_define_module(viz opencv_core WRAP python)
include(${VTK_USE_FILE})
ocv_target_link_libraries(${the_module} ${VTK_LIBRARIES})
if(APPLE AND BUILD_opencv_viz)
ocv_target_link_libraries(opencv_viz "-framework Cocoa")
ocv_target_link_libraries(${the_module} "-framework Cocoa")
endif()
if(TARGET opencv_test_viz)
+9 -2
View File
@@ -11,6 +11,11 @@ endif()
function(include_one_module m)
include("${OPENCV_MODULE_${m}_LOCATION}/CMakeLists.txt")
foreach(var
CMAKE_CXX_FLAGS CMAKE_C_FLAGS # Propagate warnings settings
)
set(${var} "${${var}}" PARENT_SCOPE)
endforeach()
endfunction()
if(NOT OPENCV_INITIAL_PASS)
@@ -35,12 +40,14 @@ ocv_add_module(world opencv_core)
set(headers_list "HEADERS")
set(sources_list "SOURCES")
set(link_deps "")
foreach(m ${OPENCV_MODULE_${the_module}_DEPS})
foreach(m ${OPENCV_MODULE_${the_module}_DEPS} opencv_world)
if(OPENCV_MODULE_${m}_IS_PART_OF_WORLD)
set(headers_list "${headers_list};${OPENCV_MODULE_${m}_HEADERS}")
set(sources_list "${sources_list};${OPENCV_MODULE_${m}_SOURCES}")
endif()
set(link_deps "${link_deps};${OPENCV_MODULE_${m}_LINK_DEPS}")
if(NOT " ${OPENCV_MODULE_${m}_LINK_DEPS}" STREQUAL " ")
list(APPEND link_deps ${OPENCV_MODULE_${m}_LINK_DEPS})
endif()
endforeach()
ocv_glob_module_sources(${headers_list} ${sources_list})