diff options
| author | 2009-07-30 18:26:43 +0000 | |
|---|---|---|
| committer | 2009-07-30 18:26:43 +0000 | |
| commit | 34752b0af5bee5979530dae9adc874ee5940b70e (patch) | |
| tree | dfc4098a0d49d1f9fcd7b441e6b0fe4d6e66d357 /src | |
| parent | implemented #394 , parts of #161 (diff) | |
| download | KVIrc-34752b0af5bee5979530dae9adc874ee5940b70e.tar.gz KVIrc-34752b0af5bee5979530dae9adc874ee5940b70e.tar.bz2 KVIrc-34752b0af5bee5979530dae9adc874ee5940b70e.zip | |
[KVIrc] (trunk) Revert r3376, r3374 didn't break Python.
After testing and discussion with hellvis69 it was found, that the
changes in r3374 didn't break Python support. A test build of r3391
(which includes the source code for the Python module) showed, that
1.) the module is linked against the SO,
2.) »python.load« and »python.begin [...] python.end« doesn't
result in errors.
Additionally this commit ensures, that the Python module is only
build if CMake was called with WITH_PYTHON=YES as the Python code
is still experimental.
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@3393 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src')
| -rw-r--r-- | src/modules/python/CMakeLists.txt | 18 | ||||
| -rw-r--r-- | src/modules/pythoncore/CMakeLists.txt | 41 |
2 files changed, 26 insertions, 33 deletions
diff --git a/src/modules/python/CMakeLists.txt b/src/modules/python/CMakeLists.txt index e9c44a622..668608d4f 100644 --- a/src/modules/python/CMakeLists.txt +++ b/src/modules/python/CMakeLists.txt @@ -1,12 +1,16 @@ # CMakeLists for src/modules/python +# +# Only build this, if WITH_PYTHON was set and passed to CMake -SET(kvipython_SRCS - libkvipython.cpp -) +IF(WANT_PYTHON) + SET(kvipython_SRCS + libkvipython.cpp + ) -# After this call, files will be moc'ed to moc_kvi_*.cpp -QT4_WRAP_CPP(kvipython_MOC_SRCS ${kvipython_MOC_HDRS}) + # After this call, files will be moc'ed to moc_kvi_*.cpp + QT4_WRAP_CPP(kvipython_MOC_SRCS ${kvipython_MOC_HDRS}) -SET(kvi_module_name kvipython) + SET(kvi_module_name kvipython) -INCLUDE(${CMAKE_SOURCE_DIR}/cmake/module.rules.txt) + INCLUDE(${CMAKE_SOURCE_DIR}/cmake/module.rules.txt) +ENDIF(WANT_PYTHON) diff --git a/src/modules/pythoncore/CMakeLists.txt b/src/modules/pythoncore/CMakeLists.txt index 2d0036d27..5630c4e6c 100644 --- a/src/modules/pythoncore/CMakeLists.txt +++ b/src/modules/pythoncore/CMakeLists.txt @@ -1,32 +1,21 @@ # CMakeLists for src/modules/pythoncore +# +# Only build this if WITH_PYTHON was passed to CMake. -SET(kvipythoncore_MOC_HDRS - pythoncoreinterface.h -) +IF(WANT_PYTHON) + SET(kvipythoncore_MOC_HDRS + pythoncoreinterface.h + ) -SET(kvipythoncore_SRCS - libkvipythoncore.cpp - kvircmodule.cpp -) + SET(kvipythoncore_SRCS + libkvipythoncore.cpp + kvircmodule.cpp + ) -# After this call, files will be moc'ed to moc_kvi_*.cpp -QT4_WRAP_CPP(kvipythoncore_MOC_SRCS ${kvipythoncore_MOC_HDRS}) + # After this call, files will be moc'ed to moc_kvi_*.cpp + QT4_WRAP_CPP(kvipythoncore_MOC_SRCS ${kvipythoncore_MOC_HDRS}) -SET(kvi_module_name kvipythoncore) + SET(kvi_module_name kvipythoncore) -IF(COMPILE_PYTHON_SUPPORT) - EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE}-config --cflags - OUTPUT_VARIABLE PYTHON_COMPILE_FLAGS - ) - - # Remove new line characters - STRING(REGEX REPLACE "(\r?\n)+$" "" PYTHON_COMPILE_FLAGS "${PYTHON_COMPILE_FLAGS}") - # Remove leading and trailing spaces (string strip) - STRING(REGEX REPLACE "(^( )+|( )+$)" "" PYTHON_COMPILE_FLAGS "${PYTHON_COMPILE_FLAGS}") -ENDIF() - -INCLUDE(${CMAKE_SOURCE_DIR}/cmake/module.rules.txt) - -IF(COMPILE_PYTHON_SUPPORT) - SET_TARGET_PROPERTIES(${kvi_module_name} PROPERTIES COMPILE_FLAGS "${PYTHON_COMPILE_FLAGS}") -ENDIF() + INCLUDE(${CMAKE_SOURCE_DIR}/cmake/module.rules.txt) +ENDIF(WANT_PYTHON) |
