From a260a414d8c875fbeda2862ce8adf7ddc1a9be3c Mon Sep 17 00:00:00 2001 From: Lauro Neto Date: Tue, 11 Jan 2011 17:07:26 -0300 Subject: Append python name to libshiboken output file libshiboken is strongly tied to the python it was compiled against. This commit adds the python name to the output file to make this connection explicit. The generator plugin, binary and includes are untouched as they don't depend on python. Also, Instead of installing the cmake info in a single file, ShibokenConfig.cmake will load the correct file (ShibokenConfig-.cmake) based on the value of PYTHON_BASENAME when cmake is called. The last shiboken installed will be the default as each install will overwrite ShibokenConfig.cmake. To select an specific python, call cmake with -DPYTHON_BASENAME=python2.6, for python2.6 release. Reviewer: Marcelo Lira Lauro Moura --- CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index d0891ce99..52aea4346 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,6 +70,16 @@ execute_process( OUTPUT_VARIABLE PY_DEBUG OUTPUT_STRIP_TRAILING_WHITESPACE) + +execute_process( + COMMAND ${PYTHON_EXECUTABLE} -c "import sys; \\ + from distutils import sysconfig; \\ + vr = sys.version_info; \\ + suffix = '-dbg' if bool(sysconfig.get_config_var('Py_DEBUG')) else ''; \\ + print 'python%d.%d%s' % (vr[0], vr[1], suffix)" + OUTPUT_VARIABLE PYTHON_BASENAME + OUTPUT_STRIP_TRAILING_WHITESPACE) + set(SHIBOKEN_BUILD_TYPE "Release") if(CMAKE_BUILD_TYPE STREQUAL "Debug") if(NOT PYTHON_DEBUG_LIBRARIES) -- cgit v1.2.3