From 0ff04d9b7764b9fcca58eed7cd8788f67fa143b9 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Thu, 23 Oct 2014 11:38:02 +0200 Subject: Add Python support code to release GIL on grab A compile time switch WITH_PYTHON_MULTITHREADING has been added that toggles GIL releasing. --- src/CMakeLists.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/CMakeLists.txt') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3ae5422..3d94c98 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -46,6 +46,20 @@ set_target_properties(uca PROPERTIES SOVERSION ${UCA_ABI_VERSION}) target_link_libraries(uca ${UCA_DEPS}) +#}}} +#{{{ Python + +pkg_check_modules(PYTHON python) + +if (PYTHON_FOUND) + option(WITH_PYTHON_MULTITHREADING "Enable Python multithreading support" ON) + + if (WITH_PYTHON_MULTITHREADING) + include_directories(${PYTHON_INCLUDE_DIRS}) + target_link_libraries(uca ${PYTHON_LIBRARIES}) + endif () +endif () + #}}} #{{{ GObject introspection if (INTROSPECTION_SCANNER AND INTROSPECTION_COMPILER) -- cgit v1.2.3