From 33f7ff2b4d26cede665a087178ca444c6d0894dd Mon Sep 17 00:00:00 2001 From: Hugo Parente Lima Date: Thu, 17 Jun 2010 17:25:00 -0300 Subject: Fix bug#242 - "PySide is installed into wrong path on Mac OS X" If the cmake variable SITE_PACKAGE is set, we wont try to detect the SITE_PACKAGES variable. Reviewed: Marcelo Lira Luciano Wolf --- CMakeLists.txt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b26d1c89..d0461bf30 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -113,13 +113,17 @@ add_custom_target(dist echo "Source package created at ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2.\n" WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) -execute_process( - COMMAND ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; \\ - print sysconfig.get_python_lib(1,0,prefix='${CMAKE_INSTALL_PREFIX}')" - OUTPUT_VARIABLE SITE_PACKAGE - OUTPUT_STRIP_TRAILING_WHITESPACE) if (NOT SITE_PACKAGE) - message(FATAL_ERROR "Could not detect Python module installation directory.") + execute_process( + COMMAND ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; \\ + print sysconfig.get_python_lib(1,0,prefix='${CMAKE_INSTALL_PREFIX}')" + OUTPUT_VARIABLE SITE_PACKAGE + OUTPUT_STRIP_TRAILING_WHITESPACE) + if (NOT SITE_PACKAGE) + message(FATAL_ERROR "Could not detect Python module installation directory.") + elseif (APPLE) + message(STATUS "!!! The generated bindings will be installed on ${SITE_PACKAGE}, is it right!?") + endif() endif() set(GENERATOR_EXTRA_FLAGS --generatorSet=shiboken --enable-parent-ctor-heuristic --enable-pyside-extensions --enable-return-value-heuristic) -- cgit v1.2.3