diff options
author | Lauro Neto <lauro.neto@openbossa.org> | 2011-01-11 17:07:26 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:12:53 -0300 |
commit | a260a414d8c875fbeda2862ce8adf7ddc1a9be3c (patch) | |
tree | 545792ffe50a79ee0ed249dcf50dc870ae264cd8 /CMakeLists.txt | |
parent | 0e7ecded1f8d944ee138d79b46f10e5f6c6618c7 (diff) |
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-<python name>.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 <marcelo.lira@openbossa.org>
Lauro Moura <lauro.neto@openbossa.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 10 insertions, 0 deletions
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) |