summaryrefslogtreecommitdiffstats
path: root/Modules/FindPythonLibs.cmake
diff options
context:
space:
mode:
authorMarcus D. Hanwell <marcus.hanwell@kitware.com>2010-08-13 18:49:29 (GMT)
committerMarcus D. Hanwell <marcus.hanwell@kitware.com>2010-08-13 18:49:29 (GMT)
commit42fd9a596fdc300855f5c8d2f755c0a2181ffd34 (patch)
tree51182949507968467b141a520bc2915e842324a9 /Modules/FindPythonLibs.cmake
parent2cde67a78123a4e59390f7aa2030ea8ff9e206d2 (diff)
downloadCMake-42fd9a596fdc300855f5c8d2f755c0a2181ffd34.zip
CMake-42fd9a596fdc300855f5c8d2f755c0a2181ffd34.tar.gz
CMake-42fd9a596fdc300855f5c8d2f755c0a2181ffd34.tar.bz2
Bug with default library type of Python modules.
The _TARGET_SUPPORTS_SHARED_LIBS variable was being altered outside of the find module, moving it into the function fixes any of these scoping issues. Fix tested and verified in VTK and Titan.
Diffstat (limited to 'Modules/FindPythonLibs.cmake')
-rw-r--r--Modules/FindPythonLibs.cmake6
1 files changed, 2 insertions, 4 deletions
diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake
index 423d5dd..d12f14a 100644
--- a/Modules/FindPythonLibs.cmake
+++ b/Modules/FindPythonLibs.cmake
@@ -105,11 +105,9 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibs DEFAULT_MSG PYTHON_LIBRARIES PYTHON
# PYTHON_ADD_MODULE(<name> src1 src2 ... srcN) is used to build modules for python.
# PYTHON_WRITE_MODULES_HEADER(<filename>) writes a header file you can include
# in your sources to initialize the static python modules
-
-GET_PROPERTY(_TARGET_SUPPORTS_SHARED_LIBS
- GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS)
-
FUNCTION(PYTHON_ADD_MODULE _NAME )
+ GET_PROPERTY(_TARGET_SUPPORTS_SHARED_LIBS
+ GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS)
OPTION(PYTHON_ENABLE_MODULE_${_NAME} "Add module ${_NAME}" TRUE)
OPTION(PYTHON_MODULE_${_NAME}_BUILD_SHARED
"Add module ${_NAME} shared" ${_TARGET_SUPPORTS_SHARED_LIBS})