Merge pull request #3865 from tdsmith:2.4-python-linkage
This commit is contained in:
commit
b01f067614
@ -63,9 +63,13 @@ add_custom_command(
|
|||||||
add_library(${the_module} SHARED src2/cv2.cpp ${CMAKE_CURRENT_BINARY_DIR}/generated0.i ${cv2_generated_hdrs} src2/cv2.cv.hpp)
|
add_library(${the_module} SHARED src2/cv2.cpp ${CMAKE_CURRENT_BINARY_DIR}/generated0.i ${cv2_generated_hdrs} src2/cv2.cv.hpp)
|
||||||
if(PYTHON_DEBUG_LIBRARIES AND NOT PYTHON_LIBRARIES MATCHES "optimized.*debug")
|
if(PYTHON_DEBUG_LIBRARIES AND NOT PYTHON_LIBRARIES MATCHES "optimized.*debug")
|
||||||
target_link_libraries(${the_module} debug ${PYTHON_DEBUG_LIBRARIES} optimized ${PYTHON_LIBRARIES})
|
target_link_libraries(${the_module} debug ${PYTHON_DEBUG_LIBRARIES} optimized ${PYTHON_LIBRARIES})
|
||||||
|
else()
|
||||||
|
if(APPLE)
|
||||||
|
set_target_properties(${the_module} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
|
||||||
else()
|
else()
|
||||||
target_link_libraries(${the_module} ${PYTHON_LIBRARIES})
|
target_link_libraries(${the_module} ${PYTHON_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
target_link_libraries(${the_module} ${OPENCV_MODULE_${the_module}_DEPS})
|
target_link_libraries(${the_module} ${OPENCV_MODULE_${the_module}_DEPS})
|
||||||
|
|
||||||
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('SO')"
|
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('SO')"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user