|
From: <ai...@us...> - 2013-06-25 19:28:38
|
Revision: 12387
http://sourceforge.net/p/plplot/code/12387
Author: airwin
Date: 2013-06-25 19:28:34 +0000 (Tue, 25 Jun 2013)
Log Message:
-----------
Deal properly with case where CMAKE_INSTALL_PREFIX is an empty string.
(This case is typically used to generate binary distribution tarballs.)
Modified Paths:
--------------
trunk/cmake/modules/python.cmake
Modified: trunk/cmake/modules/python.cmake
===================================================================
--- trunk/cmake/modules/python.cmake 2013-06-25 18:49:38 UTC (rev 12386)
+++ trunk/cmake/modules/python.cmake 2013-06-25 19:28:34 UTC (rev 12387)
@@ -111,11 +111,20 @@
endif(ENABLE_python AND HAVE_NUMPY)
if(ENABLE_python)
+ # if CMAKE_INSTALL_EXEC_PREFIX is an empty string, must replace
+ # it with "/" to make PYTHON_INSTALL_TEMPLATE an absolute path to be
+ # consistent with all other installation paths.
+ if(CMAKE_INSTALL_EXEC_PREFIX)
+ set(PYTHON_INSTALL_TEMPLATE "${CMAKE_INSTALL_EXEC_PREFIX}")
+ else(CMAKE_INSTALL_EXEC_PREFIX)
+ set(PYTHON_INSTALL_TEMPLATE "/")
+ endif(CMAKE_INSTALL_EXEC_PREFIX)
+
# N.B. This is a nice way to obtain all sorts of Python information
# using distutils.
execute_process(
COMMAND
- ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='${CMAKE_INSTALL_EXEC_PREFIX}')"
+ ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='${PYTHON_INSTALL_TEMPLATE}')"
OUTPUT_VARIABLE PYTHON_INSTDIR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|