Last active
August 29, 2015 13:56
-
-
Save lnhrdt/9247742 to your computer and use it in GitHub Desktop.
Fix OpenCV CMake script to build against Homebrew-installed Python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/cmake/OpenCVDetectPython.cmake | |
+++ b/cmake/OpenCVDetectPython.cmake | |
@@ -39,9 +39,9 @@ | |
if(NOT ANDROID AND NOT IOS) | |
ocv_check_environment_variables(PYTHON_LIBRARY PYTHON_INCLUDE_DIR) | |
if(CMAKE_VERSION VERSION_GREATER 2.8.8 AND PYTHON_VERSION_FULL) | |
- find_host_package(PythonLibs ${PYTHON_VERSION_FULL} EXACT) | |
+ find_host_package(PythonLibs ${PYTHON_VERSION_FULL} EXACT CMAKE_FIND_FRAMEWORK LAST) | |
else() | |
- find_host_package(PythonLibs ${PYTHON_VERSION_FULL}) | |
+ find_host_package(PythonLibs ${PYTHON_VERSION_FULL} CMAKE_FIND_FRAMEWORK LAST) | |
endif() | |
# cmake 2.4 (at least on Ubuntu 8.04 (hardy)) don't define PYTHONLIBS_FOUND | |
if(NOT PYTHONLIBS_FOUND AND PYTHON_INCLUDE_PATH) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment