Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Tetragramm
GitHub Repository: Tetragramm/opencv
Path: blob/master/modules/python/CMakeLists.txt
16337 views
1
# ----------------------------------------------------------------------------
2
# CMake file for python support
3
# ----------------------------------------------------------------------------
4
if(DEFINED OPENCV_INITIAL_PASS) # OpenCV build
5
6
add_subdirectory(bindings)
7
8
if(ANDROID OR APPLE_FRAMEWORK OR WINRT)
9
set(__disable_python2 ON)
10
set(__disable_python3 ON)
11
elseif(BUILD_opencv_world OR (WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Debug"))
12
if(NOT DEFINED BUILD_opencv_python2)
13
set(__disable_python2 ON)
14
endif()
15
if(NOT DEFINED BUILD_opencv_python3)
16
set(__disable_python3 ON)
17
endif()
18
endif()
19
20
if(__disable_python2)
21
ocv_module_disable_(python2)
22
endif()
23
if(__disable_python3)
24
ocv_module_disable_(python3)
25
endif()
26
if(__disable_python2 AND __disable_python3)
27
return()
28
endif()
29
30
add_subdirectory(python2)
31
add_subdirectory(python3)
32
33
else() # standalone build
34
35
cmake_minimum_required(VERSION 2.8.12)
36
include("./standalone.cmake")
37
38
endif()
39
40