From 5c5cd449b3b33a35106c6c90412e7a2e677f4b84 Mon Sep 17 00:00:00 2001 From: Ethan Rublee Date: Tue, 24 May 2011 00:30:03 +0000 Subject: [PATCH] Adding python default install path for debian vs mac. changing site-packages -> dist-packages. See python help for site. Also ticket #1087. --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5526e85bae..cc9acd2634 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -541,7 +541,11 @@ if(BUILD_NEW_PYTHON_SUPPORT) string(REGEX MATCH "[0-9].[0-9]" PYTHON_VERSION_MAJOR_MINOR "${PYTHON_VERSION_FULL}") if(UNIX) set(PYTHON_PLUGIN_INSTALL_PATH lib/python${PYTHON_VERSION_MAJOR_MINOR}/site-packages/opencv) - set(PYTHON_PACKAGES_PATH lib/python${PYTHON_VERSION_MAJOR_MINOR}/site-packages) + if(APPLE) + set(PYTHON_PACKAGES_PATH lib/python${PYTHON_VERSION_MAJOR_MINOR}/site-packages CACHE PATH "Where to install the python packages.") + else() #debian based assumed, install to the dist-packages. + set(PYTHON_PACKAGES_PATH lib/python${PYTHON_VERSION_MAJOR_MINOR}/dist-packages CACHE PATH "Where to install the python packages.") + endif() endif() if(WIN32) get_filename_component(PYTHON_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${PYTHON_VERSION_MAJOR_MINOR}\\InstallPath]" ABSOLUTE CACHE)