diff options
| author | Marcos David Dione <mdione@grulic.org.ar> | 2009-05-09 16:37:59 +0000 | 
|---|---|---|
| committer | Marcos David Dione <mdione@grulic.org.ar> | 2009-05-09 16:37:59 +0000 | 
| commit | 424619adfbeaf79a0b4c1e4c3011aa45d2967901 (patch) | |
| tree | 611af95fc123ddf61d9234f48ac43ccace4cc3b8 | |
| parent | 2118ce5907c4748fec1982fc281187a01a4860b7 (diff) | |
| download | extra-cmake-modules-424619adfbeaf79a0b4c1e4c3011aa45d2967901.tar.gz extra-cmake-modules-424619adfbeaf79a0b4c1e4c3011aa45d2967901.tar.bz2  | |
this patch honors -DPYTHON_SITE_PACKAGES_DIR. if not set, then checks for -DPYTHON_LIBS_WITH_KDE_LIBS. if set, it installs python modules in kde's lib dir; if not, it installs them in python's dir, which is the default.
svn path=/trunk/KDE/kdelibs/; revision=965738
| -rw-r--r-- | modules/FindPythonLibrary.cmake | 12 | 
1 files changed, 9 insertions, 3 deletions
diff --git a/modules/FindPythonLibrary.cmake b/modules/FindPythonLibrary.cmake index 80f3f4ab..d98cb621 100644 --- a/modules/FindPythonLibrary.cmake +++ b/modules/FindPythonLibrary.cmake @@ -3,12 +3,12 @@  # Find the Python interpreter and related Python directories.  #  # This file defines the following variables: -#  +#  # PYTHON_EXECUTABLE - The path and filename of the Python interpreter.  #  # PYTHON_SHORT_VERSION - The version of the Python interpreter found,  #     excluding the patch version number. (e.g. 2.5 and not 2.5.1)) -#  +#  # PYTHON_LONG_VERSION - The version of the Python interpreter found as a human  #     readable string.  # @@ -43,7 +43,13 @@ else(EXISTS PYTHON_LIBRARY)        STRING(REGEX REPLACE ".*\nshort_version:([^\n]+).*$" "\\1" PYTHON_SHORT_VERSION ${python_config})        STRING(REGEX REPLACE ".*\nlong_version:([^\n]+).*$" "\\1" PYTHON_LONG_VERSION ${python_config})        STRING(REGEX REPLACE ".*\npy_inc_dir:([^\n]+).*$" "\\1" PYTHON_INCLUDE_PATH ${python_config}) -      STRING(REGEX REPLACE ".*\nsite_packages_dir:([^\n]+).*$" "\\1" PYTHON_SITE_PACKAGES_DIR ${python_config}) +      if(NOT PYTHON_SITE_PACKAGES_DIR) +        if(NOT PYTHON_LIBS_WITH_KDE_LIBS) +          STRING(REGEX REPLACE ".*\nsite_packages_dir:([^\n]+).*$" "\\1" PYTHON_SITE_PACKAGES_DIR ${python_config}) +        else(NOT PYTHON_LIBS_WITH_KDE_LIBS) +          set(PYTHON_SITE_PACKAGES_DIR ${KDE4_LIB_INSTALL_DIR}/python${PYTHON_SHORT_VERSION}/site-packages) +        endif(NOT PYTHON_LIBS_WITH_KDE_LIBS) +      endif(NOT PYTHON_SITE_PACKAGES_DIR)        STRING(REGEX REPLACE "([0-9]+).([0-9]+)" "\\1\\2" PYTHON_SHORT_VERSION_NO_DOT ${PYTHON_SHORT_VERSION})        set(PYTHON_LIBRARY_NAMES python${PYTHON_SHORT_VERSION} python${PYTHON_SHORT_VERSION_NO_DOT})        if(WIN32)  | 
