diff options
author | Bryan Forbes | 2011-09-26 17:14:39 +0200 |
---|---|---|
committer | Nikias Bassen | 2011-09-26 17:14:39 +0200 |
commit | 2ca52d65bb113e8639e732f67fec3c3223c0a444 (patch) | |
tree | b937e0c7a6a93eca914c0571bd71c85a3f2408b4 /CMakeLists.txt | |
parent | 36ad4384303e94b19cdf7a5ff43182efebe1b398 (diff) | |
download | libplist-2ca52d65bb113e8639e732f67fec3c3223c0a444.tar.gz libplist-2ca52d65bb113e8639e732f67fec3c3223c0a444.tar.bz2 |
Added cython bindings.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 17 |
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) |