cmake: python, allow dynamic symbols lookup from libpython.so

This commit is contained in:
Alexander Alekhin
2016-07-06 19:53:32 +03:00
parent 22682f933a
commit c0fe374490
5 changed files with 50 additions and 58 deletions

View File

@@ -75,10 +75,10 @@ if(NOT ${found})
if(NOT ANDROID AND NOT APPLE_FRAMEWORK)
ocv_check_environment_variables(${library_env} ${include_dir_env})
if(NOT ${${library_env}} EQUAL "")
if(NOT ${${library_env}} STREQUAL "")
set(PYTHON_LIBRARY "${${library_env}}")
endif()
if(NOT ${${include_dir_env}} EQUAL "")
if(NOT ${${include_dir_env}} STREQUAL "")
set(PYTHON_INCLUDE_DIR "${${include_dir_env}}")
endif()
@@ -162,10 +162,10 @@ if(NOT ${found})
message(STATUS "Cannot probe for Python/Numpy support (because we are cross-compiling OpenCV)")
message(STATUS "If you want to enable Python/Numpy support, set the following variables:")
message(STATUS " PYTHON2_INCLUDE_PATH")
message(STATUS " PYTHON2_LIBRARIES")
message(STATUS " PYTHON2_LIBRARIES (optional on Unix-like systems)")
message(STATUS " PYTHON2_NUMPY_INCLUDE_DIRS")
message(STATUS " PYTHON3_INCLUDE_PATH")
message(STATUS " PYTHON3_LIBRARIES")
message(STATUS " PYTHON3_LIBRARIES (optional on Unix-like systems)")
message(STATUS " PYTHON3_NUMPY_INCLUDE_DIRS")
else()
# Attempt to discover the NumPy include directory. If this succeeds, then build python API with NumPy