summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt17
1 files changed, 14 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a1d34e8..3ce3b7c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,13 +17,21 @@ ENDIF(NOT DEFINED CMAKE_INSTALL_LIBDIR)
FIND_PACKAGE( LibXml2 REQUIRED )
-OPTION(ENABLE_PYTHON "Enable Python bindings (needs Swig)" ON)
+OPTION(ENABLE_SWIG "Enable SWIG Python bindings (needs Swig)" ON)
+OPTION(ENABLE_CYTHON "Enable Cython Python bindings (needs Cython)" ON)
-IF(ENABLE_PYTHON)
+IF(ENABLE_SWIG)
FIND_PACKAGE( SWIG )
+ENDIF(ENABLE_SWIG)
+
+IF(ENABLE_CYTHON)
+ FIND_PACKAGE( Cython )
+ENDIF(ENABLE_CYTHON)
+
+IF(ENABLE_SWIG OR ENABLE_CYTHON)
FIND_PACKAGE( PythonInterp )
FIND_PACKAGE( PythonLibs )
-ENDIF(ENABLE_PYTHON)
+ENDIF(ENABLE_SWIG OR ENABLE_CYTHON)
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_INCLUDE_PATH})
@@ -52,6 +60,9 @@ ADD_SUBDIRECTORY( test )
IF ( SWIG_FOUND AND PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND )
ADD_SUBDIRECTORY( swig )
ENDIF ( SWIG_FOUND AND PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND )
+IF ( CYTHON_FOUND AND PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND )
+ ADD_SUBDIRECTORY( cython )
+ENDIF ( CYTHON_FOUND AND PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND )
# add uninstall target
CONFIGURE_FILE( "${CMAKE_SOURCE_DIR}/cmake/modules/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY)