- Recommended compiler checks:
- GCC: CV_GCC
- Clang: CV_CLANG
- fixed problem with CMAKE_CXX_COMPILER_ID=Clang/AppleClang mess on MacOSX
Details: cmake --help-policy CMP0025
- do not declare Clang as GCC compiler
Explicitly linking to a Python framework on OS X prevents modules from
being built against one Python (i.e. system python) and imported from
another (i.e. Homebrew python); the interpreter segfaults if there's a
linkage to a foreign Python. Building the module with `-undefined
dynamic_lookup` instead of an explicit link allows the symbols to be
resolved at load time from a compatible python.
Build the Python 3 cv2 module in lib/python3/, to avoid potential naming
conflicts with the Python 2 bindings.
The Python 2 bindings are placed directly in lib/, where they are
required for the Buildbot to successfully execute the Python tests.
Place the built Python module library in a dedicated folder inside of
lib/. This ensures that even if the Python 2 and Python 3 module names
conflict, they will not overwrite one another.
If both Python 2 and Python 3 are found, then build bindings for both of
them during the build process. Currently, one version of Python is
detected automatically, and building for the other requires changes the
CMake config.
The largest chunk of this change generalizes OpenCVDetectPython.cmake to
find both a Python 2 and Python 3 version of Python. Secondly, the
opencv_python module is split into two modules, opencv_python2 and
opencv_python3. Both are built from the same source. but for different
versions of Python.
some of the stuff will be moved to opencv_contrib module.
in order to make this PR pass buildbot, please, comment off opencv_legacy, opencv_contrib and opencv_softcascade test runs.
- all parsed headers are included into "cv2.cpp" with "pyopencv_generated_include.h"
- types starting with "Ptr_" converted to "Ptr<...>" form (avoids many typedefs in "cv2.cpp")