summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorChristian Andersson <chria@maths.lth.se>2012-01-10 14:55:42 (GMT)
committerBrad King <brad.king@kitware.com>2012-01-10 14:58:43 (GMT)
commita04ced3b38cc1ac7903a219c8abc9e31dfe5fbe8 (patch)
tree21786ae3de1e925a188e950064d4523e1eae3beb /Modules
parent0020fc45171c2d8b954492ea76c3b3940ebf53f3 (diff)
downloadCMake-a04ced3b38cc1ac7903a219c8abc9e31dfe5fbe8.zip
CMake-a04ced3b38cc1ac7903a219c8abc9e31dfe5fbe8.tar.gz
CMake-a04ced3b38cc1ac7903a219c8abc9e31dfe5fbe8.tar.bz2
FindPythonLibs: Search for single-user installs on Windows
When cmake searches for Python libs in Windows it searches in: [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs However, the information might not always reside there. The information could also reside in: [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs when one installs Python for a single user and not for all users.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindPythonLibs.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake
index adcec46..da7a1ac 100644
--- a/Modules/FindPythonLibs.cmake
+++ b/Modules/FindPythonLibs.cmake
@@ -40,13 +40,17 @@ FOREACH(_CURRENT_VERSION ${_Python_VERSIONS})
NAMES python${_CURRENT_VERSION_NO_DOTS}_d python
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug
- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs )
+ [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug
+ [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
+ [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
+ )
ENDIF(WIN32)
FIND_LIBRARY(PYTHON_LIBRARY
NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION}
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
+ [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
# Avoid finding the .dll in the PATH. We want the .lib.
NO_SYSTEM_ENVIRONMENT_PATH
)
@@ -79,6 +83,7 @@ FOREACH(_CURRENT_VERSION ${_Python_VERSIONS})
PATHS
${PYTHON_FRAMEWORK_INCLUDES}
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
+ [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
PATH_SUFFIXES
python${_CURRENT_VERSION}
)