Skip to content

Instantly share code, notes, and snippets.

@tdsmith
Created March 24, 2015 06:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tdsmith/f67fd567702f2b51dacd to your computer and use it in GitHub Desktop.
Save tdsmith/f67fd567702f2b51dacd to your computer and use it in GitHub Desktop.
diff --git a/modules/python/common.cmake b/modules/python/common.cmake
index b09b721..5743980 100644
--- a/modules/python/common.cmake
+++ b/modules/python/common.cmake
@@ -50,7 +50,11 @@ ocv_add_library(${the_module} SHARED ${PYTHON_SOURCE_DIR}/src2/cv2.cpp ${cv2_gen
if(PYTHON_DEBUG_LIBRARIES AND NOT PYTHON_LIBRARIES MATCHES "optimized.*debug")
ocv_target_link_libraries(${the_module} debug ${PYTHON_DEBUG_LIBRARIES} optimized ${PYTHON_LIBRARIES})
else()
- ocv_target_link_libraries(${the_module} ${PYTHON_LIBRARIES})
+ if(APPLE)
+ set_target_properties(${the_module} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
+ else()
+ ocv_target_link_libraries(${the_module} ${PYTHON_LIBRARIES})
+ endif()
endif()
ocv_target_link_libraries(${the_module} ${OPENCV_MODULE_${the_module}_DEPS})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment