diff options
author | Alexander Neundorf <neundorf@kde.org> | 2007-07-19 14:20:21 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2007-07-19 14:20:21 (GMT) |
commit | 3d862c44f1be74c28858f7b3932b9f17fc551d20 (patch) | |
tree | e062d2f5fe49c605901c4937897c2294c3b95d44 | |
parent | ad8efca061f2d4462e681fb6f5de8864f59795da (diff) | |
download | CMake-3d862c44f1be74c28858f7b3932b9f17fc551d20.zip CMake-3d862c44f1be74c28858f7b3932b9f17fc551d20.tar.gz CMake-3d862c44f1be74c28858f7b3932b9f17fc551d20.tar.bz2 |
ENH: only load the static modules in the LoadAll function
Alex
-rw-r--r-- | Modules/FindPythonLibs.cmake | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake index 17f004a..b3edd92 100644 --- a/Modules/FindPythonLibs.cmake +++ b/Modules/FindPythonLibs.cmake @@ -94,11 +94,12 @@ MACRO(PYTHON_ADD_MODULE _NAME ) SET(PY_MODULE_TYPE MODULE) ELSE(PYTHON_MODULE_${_NAME}_SHARED) SET(PY_MODULE_TYPE STATIC) + SET(PY_STATIC_MODULES_LIST ${PY_STATIC_MODULES_LIST} ${_NAME}) ENDIF(PYTHON_MODULE_${_NAME}_SHARED) SET(PY_MODULES_LIST ${PY_MODULES_LIST} ${_NAME}) ADD_LIBRARY(${_NAME} ${PY_MODULE_TYPE} ${ARGN}) - TARGET_LINK_LIBRARIES(${_NAME} ${PYTHON_LIBRARIES}) +# TARGET_LINK_LIBRARIES(${_NAME} ${PYTHON_LIBRARIES}) ENDIF(PYTHON_ENABLE_MODULE_${_NAME}) ENDMACRO(PYTHON_ADD_MODULE) @@ -120,8 +121,8 @@ MACRO(PYTHON_WRITE_MODULES_HEADER _filename) ENDFOREACH(_currentModule ${PY_MODULES_LIST}) FILE(APPEND ${_filename} "#ifndef EXCLUDE_LOAD_ALL_FUNCTION\nvoid CMakeLoadAllPythonModules(void)\n{\n") - FOREACH(_currentModule ${PY_MODULES_LIST}) + FOREACH(_currentModule ${PY_STATIC_MODULES_LIST}) FILE(APPEND ${_filename} " CMakeLoadPythonModule_${_currentModule}();\n") - ENDFOREACH(_currentModule ${PY_MODULES_LIST}) + ENDFOREACH(_currentModule ${PY_STATIC_MODULES_LIST}) FILE(APPEND ${_filename} "}\n#endif\n\n#endif\n") ENDMACRO(PYTHON_WRITE_MODULES_HEADER) |