Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
a5d16f09
Commit
a5d16f09
authored
Jan 18, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake world: allow to build python bindings
parent
36b34465
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
10 deletions
+23
-10
OpenCVModule.cmake
cmake/OpenCVModule.cmake
+5
-2
CMakeLists.txt
modules/python/CMakeLists.txt
+18
-8
No files found.
cmake/OpenCVModule.cmake
View file @
a5d16f09
...
...
@@ -233,7 +233,7 @@ macro(ocv_add_module _name)
endmacro
()
# excludes module from current configuration
macro
(
ocv_module_disable module
)
macro
(
ocv_module_disable
_
module
)
set
(
__modname
${
module
}
)
if
(
NOT __modname MATCHES
"^opencv_"
)
set
(
__modname opencv_
${
module
}
)
...
...
@@ -246,9 +246,12 @@ macro(ocv_module_disable module)
# touch variable controlling build of the module to suppress "unused variable" CMake warning
endif
()
unset
(
__modname
)
return
()
# leave the current folder
endmacro
()
macro
(
ocv_module_disable module
)
ocv_module_disable_
(
${
module
}
)
return
()
# leave the current folder
endmacro
()
# collect modules from specified directories
# NB: must be called only once!
...
...
modules/python/CMakeLists.txt
View file @
a5d16f09
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment